mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
The OpenBSD strtonum() uses very short error strings that can't
be translated usefully. Convert them to longer strings on error. Also use the longer strings for atomode() and atoid().
This commit is contained in:
@@ -610,7 +610,7 @@ store_int(char *val, struct sudo_defs_types *def, int op)
|
||||
i = strtonum(val, INT_MIN, INT_MAX, &errstr);
|
||||
if (errstr != NULL) {
|
||||
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
||||
"%s is %s", val, errstr);
|
||||
"%s: %s", val, errstr);
|
||||
debug_return_bool(false);
|
||||
}
|
||||
def->sd_un.ival = i;
|
||||
@@ -633,7 +633,7 @@ store_uint(char *val, struct sudo_defs_types *def, int op)
|
||||
u = strtonum(val, 0, UINT_MAX, &errstr);
|
||||
if (errstr != NULL) {
|
||||
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
|
||||
"%s is %s", val, errstr);
|
||||
"%s: %s", val, errstr);
|
||||
debug_return_bool(false);
|
||||
}
|
||||
/* XXX - should have uival */
|
||||
|
Reference in New Issue
Block a user