From 5a636f2ea12d8bb3481671e94c9ae282e6633163 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 30 Jan 2014 13:06:29 -0700 Subject: [PATCH] Zero out errstr when there is no error; fixes bug #632 --- common/atomode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.40.0