summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2014-01-30 13:06:29 -0700
committerTodd C. Miller <Todd.Miller@courtesan.com>2014-01-30 13:06:29 -0700
commite92be5dd68d8191664b6398e1f546fd29a0bfee1 (patch)
tree9bc2d5cef3480e5b3bc093deaec5be469b55e01f
parent55b00c5fd4dc025613da9a43e210324270628728 (diff)
downloadsudo-e92be5dd68d8191664b6398e1f546fd29a0bfee1.tar.gz
Zero out errstr when there is no error; fixes bug #632
-rw-r--r--common/atomode.c4
1 files changed, 3 insertions, 1 deletions
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 <Todd.Miller@courtesan.com>
+ * Copyright (c) 2013-2014 Todd C. Miller <Todd.Miller@courtesan.com>
*
* 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);
}