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>
This commit is contained in:
parent
dd002649c3
commit
2414d9df46
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue