From 2414d9df46a137fac05ebd969613f46e0a39ca8c Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Mon, 14 Apr 2014 08:59:28 +0200 Subject: 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 --- text2pcap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'text2pcap.c') 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); -- cgit v1.2.3