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-3.0.0.beta1~76^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a13560af7e8f2332ebef6e2b3be269cd0443846b;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 3b2eaa242..cbf16cb62 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -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;