]> git.proxmox.com Git - mirror_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>
Wed, 17 Jan 2018 10:19:05 +0000 (11:19 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/utils.c

index 3b2eaa242016339c59aeabdcbff30420d9078411..cbf16cb627808b195972d47b22daf1689716325f 100644 (file)
@@ -2396,7 +2396,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;