Allow hex and octal values to be used in ranges

Change-Id: I896b945067c4325a29c41c23ad39486e356d9434
Reviewed-on: https://code.wireshark.org/review/13474
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Adam Goldman 2016-01-21 15:39:47 -05:00 committed by Michael Mann
parent bd4644b336
commit baea677290
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ range_convert_str_work(range_t **rangep, const gchar *es, guint32 max_value,
} else if (g_ascii_isdigit(c)) {
/* Subrange starts with the specified number */
errno = 0;
val = strtoul(p, &endp, 10);
val = strtoul(p, &endp, 0);
if (p == endp) {
/* That wasn't a valid number. */
g_free(range);
@ -193,7 +193,7 @@ range_convert_str_work(range_t **rangep, const gchar *es, guint32 max_value,
} else if (g_ascii_isdigit(c)) {
/* Subrange ends with the specified number. */
errno = 0;
val = strtoul(p, &endp, 10);
val = strtoul(p, &endp, 0);
if (p == endp) {
/* That wasn't a valid number. */
g_free(range);