diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-07-29 14:15:01 +0200 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-07-29 14:41:02 +0000 |
commit | cc0f35436f07f17162c04103625a5545b6b31a76 (patch) | |
tree | 19d3539c1298b79ea26cf645b39a50f1877d626d /ui/text_import.c | |
parent | dff03823302e020bdfefbb1023c8297fa31d325d (diff) |
Fix Argument with 'nonnull' attribute passed null found by Clang
Change-Id: I719d8adeb4bc6dbd1e34fe56f7cf68e4c6286dc9
Reviewed-on: https://code.wireshark.org/review/3246
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'ui/text_import.c')
-rw-r--r-- | ui/text_import.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/text_import.c b/ui/text_import.c index 7b40c49a50..d02b1bdcd6 100644 --- a/ui/text_import.c +++ b/ui/text_import.c @@ -319,6 +319,11 @@ parse_num (const char *str, int offset) unsigned long num; char *c; + if (str == NULL) { + fprintf(stderr, "FATAL ERROR: str is NULL\n"); + exit(1); + } + num = strtoul(str, &c, offset ? offset_base : 16); if (c==str) { fprintf(stderr, "FATAL ERROR: Bad hex number? [%s]\n", str); |