diff options
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r-- | wiretap/erf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c index 39a923d5e0..62e5f40b77 100644 --- a/wiretap/erf.c +++ b/wiretap/erf.c @@ -49,6 +49,7 @@ #include <glib.h> #include <wsutil/crc32.h> +#include <wsutil/strtoi.h> #include "wtap-int.h" #include "file_wrappers.h" @@ -237,7 +238,7 @@ extern wtap_open_return_val erf_open(wtap *wth, int *err, gchar **err_info) /* number of records to scan before deciding if this really is ERF */ if ((s = getenv("ERF_RECORDS_TO_CHECK")) != NULL) { - if ((n = atoi(s)) >= 0 && n < 101) { + if (ws_strtoi32(s, NULL, &n) && n >= 0 && n < 101) { records_for_erf_check = n; } } |