git.samba.org
/
metze
/
wireshark
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
dd00264
)
Fix Argument with 'nonnull' attribute passed null found by Clang
author
Alexis La Goutte
<alexis.lagoutte@gmail.com>
Mon, 14 Apr 2014 06:59:28 +0000
(08:59 +0200)
committer
Anders Broman
<a.broman58@gmail.com>
Mon, 14 Apr 2014 11:52:35 +0000
(11:52 +0000)
Change-Id: If1c907308a7c776a6198530663f8dce03839d43b
Reviewed-on: https://code.wireshark.org/review/1098
Reviewed-by: Anders Broman <a.broman58@gmail.com>
text2pcap.c
patch
|
blob
|
history
diff --git
a/text2pcap.c
b/text2pcap.c
index 77310326cea996243dd32939e43712ad8aaf4795..4b1a349a89a64e16e083751a59867dd7edba5870 100644
(file)
--- 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);