diff options
author | paco <paco@voltanet.io> | 2018-06-15 15:05:12 +0200 |
---|---|---|
committer | paco <paco@voltanet.io> | 2018-06-15 19:13:58 +0200 |
commit | 2c2d5cb397c140c05ad81e8c79273bd3af13b595 (patch) | |
tree | dc27d21693e6b68f18feed77e52002b54f0a0e47 | |
parent | Merge pull request #2426 from pacovn/Coverity_23089_Buffer_not_null_terminated (diff) | |
download | frr-2c2d5cb397c140c05ad81e8c79273bd3af13b595.tar.xz frr-2c2d5cb397c140c05ad81e8c79273bd3af13b595.zip |
lib: uninitialized variable (Coverity 1469898)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to '')
-rw-r--r-- | lib/frrstr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/frrstr.c b/lib/frrstr.c index d003590ba..82c0ad773 100644 --- a/lib/frrstr.c +++ b/lib/frrstr.c @@ -78,6 +78,9 @@ char *frrstr_join(const char **parts, int argc, const char *join) size_t len = 0; size_t joinlen = join ? strlen(join) : 0; + if (!argc) + return NULL; + for (i = 0; i < argc; i++) len += strlen(parts[i]); len += argc * joinlen + 1; |