From: Stef Walter Date: Sun, 15 Mar 2015 13:23:32 +0000 (+0100) Subject: logger: Fix use of errno after strtol() without zeroing first X-Git-Tag: v2.27-rc1~362 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d341322dbf4ef80dea7821c858292c7ba5e0b25;p=thirdparty%2Futil-linux.git logger: Fix use of errno after strtol() without zeroing first References: https://bugzilla.redhat.com/show_bug.cgi?id=1202104 Signed-off-by: Karel Zak --- diff --git a/misc-utils/logger.c b/misc-utils/logger.c index ab734ddd6b..9613b951e8 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -127,6 +127,7 @@ static int decode(const char *name, CODE *codetab) int num; char *end = NULL; + errno = 0; num = strtol(name, &end, 10); if (errno || name == end || (end && *end)) return -1;