]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
utils: do not rely on unitialized variable
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 17 Jan 2018 10:19:05 +0000 (11:19 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Jan 2018 14:07:56 +0000 (15:07 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/utils.c

index aff818f5d613050d89b47b0f0953ecdf0a6f3406..3b09e0ba764ca9195c0b4a0d65efe7d100ba3921 100644 (file)
@@ -2325,7 +2325,7 @@ int parse_byte_size_string(const char *s, int64_t *converted)
        int64_t mltpl, overflow;
        char *end;
        char dup[LXC_NUMSTRLEN64 + 2];
-       char suffix[3];
+       char suffix[3] = {0};
 
        if (!s || !strcmp(s, ""))
                return -EINVAL;