diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-04-14 08:59:28 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-04-14 11:52:35 +0000 |
commit | 2414d9df46a137fac05ebd969613f46e0a39ca8c (patch) | |
tree | 7f7b612dcee39f43c4b9b45e970809de6cb7575a /text2pcap.c | |
parent | dd002649c32a0f16720236b34fe5a7aefe04c457 (diff) |
Fix Argument with 'nonnull' attribute passed null found by Clang
Change-Id: If1c907308a7c776a6198530663f8dce03839d43b
Reviewed-on: https://code.wireshark.org/review/1098
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'text2pcap.c')
-rw-r--r-- | text2pcap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/text2pcap.c b/text2pcap.c index 77310326ce..4b1a349a89 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -463,6 +463,11 @@ parse_num (const char *str, int offset) guint32 num; char *c; + if (str == NULL) { + fprintf(stderr, "FATAL ERROR: str is NULL\n"); + exit(1); + } + num = (guint32)strtoul(str, &c, offset ? offset_base : 16); if (c == str) { fprintf(stderr, "FATAL ERROR: Bad hex number? [%s]\n", str); |