dct3trace: use ws_strtoi function.
authorDario Lombardo <lomato@gmail.com>
Wed, 7 Sep 2016 12:07:51 +0000 (14:07 +0200)
committerGuy Harris <guy@alum.mit.edu>
Fri, 9 Sep 2016 07:49:26 +0000 (07:49 +0000)
Change-Id: Iaa656dc4b939ac9649b87e88c9d27082d3e53f00
Reviewed-on: https://code.wireshark.org/review/17555
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
wiretap/dct3trace.c

index e7987f62b69d58ddb7b7ced59c195507adf590ca..a2a4a0c95bcc62fef0fb9b87992265bca312c97d 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <wsutil/strtoi.h>
 
 /*
    Example downlink data:
@@ -147,7 +148,8 @@ xml_get_int(int *val, const char *str, const char *pattern)
 
        memcpy(buf, start, end - start);
        buf[end - start] = '\0';
-       *val = atoi(buf);
+       if (!ws_strtoi32(buf, NULL, val))
+               return -5;
        return 0;
 }