From faa04b13186fe22afef6f659e7a26ec0ef37b8a6 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Wed, 7 Sep 2016 14:39:46 +0200 Subject: ipfix: use ws_strtoi function. Change-Id: Icca32f714381166e505932958b87f9ffab62aa1d Reviewed-on: https://code.wireshark.org/review/17557 Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- wiretap/ipfix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wiretap') diff --git a/wiretap/ipfix.c b/wiretap/ipfix.c index b43951e335..64f38764c9 100644 --- a/wiretap/ipfix.c +++ b/wiretap/ipfix.c @@ -67,6 +67,8 @@ #include "file_wrappers.h" #include "ipfix.h" +#include + #if 0 #define ipfix_debug(...) g_warning(__VA_ARGS__) #else @@ -192,7 +194,7 @@ ipfix_open(wtap *wth, int *err, gchar **err_info) /* number of records to scan before deciding if this really is IPFIX */ if ((s = getenv("IPFIX_RECORDS_TO_CHECK")) != NULL) { - if ((n = atoi(s)) > 0 && n < 101) { + if (ws_strtoi32(s, NULL, &n) && n > 0 && n < 101) { records_for_ipfix_check = n; } } -- cgit v1.2.3