Suppress PVS Studio false positives.

This commit is contained in:
Todd C. Miller
2021-01-06 14:27:09 -07:00
parent 108e29446d
commit 4e11bc0e26
22 changed files with 473 additions and 517 deletions

View File

@@ -99,7 +99,7 @@ preload_dso(char *envp[], const char *dso_file)
* whether it was dynamically allocated. [TODO: plugin API]
*/
if (preload_idx == -1 || !enabled) {
const int env_size = env_len + 1 + (preload_idx == -1) + enabled;
const int env_size = env_len + 1 + (preload_idx == -1) + enabled; // -V547
char **nenvp = reallocarray(NULL, env_size, sizeof(*envp));
if (nenvp == NULL)