From: Todd C. Miller Date: Thu, 30 Jan 2014 20:06:29 +0000 (-0700) Subject: Zero out errstr when there is no error; fixes bug #632 X-Git-Tag: SUDO_1_8_10^2~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a636f2ea12d8bb3481671e94c9ae282e6633163;p=sudo Zero out errstr when there is no error; fixes bug #632 --- diff --git a/common/atomode.c b/common/atomode.c index 489bf0bc7..64bad4af5 100644 --- a/common/atomode.c +++ b/common/atomode.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Todd C. Miller + * Copyright (c) 2013-2014 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -62,5 +62,7 @@ atomode(const char *cp, const char **errstr) errno = ERANGE; debug_return_int(0); } + if (errstr != NULL) + *errstr = NULL; debug_return_int((int)lval); }