From: Christian Brauner Date: Wed, 17 Jan 2018 10:19:05 +0000 (+0100) Subject: utils: do not rely on unitialized variable X-Git-Tag: lxc-2.0.10~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8c45e6bf432b77dbf61ad348703e3dbb67e4437;p=thirdparty%2Flxc.git utils: do not rely on unitialized variable Signed-off-by: Christian Brauner --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index aff818f5d..3b09e0ba7 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -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;