diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-12-03 19:31:55 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-12-13 12:50:25 +0000 |
commit | 7762ee33dab4e8ae6d87d47be245b44296fd3514 (patch) | |
tree | bb6624dc5c366c21d3527732a23e90ce4247a684 /ui/text_import.c | |
parent | cda4b0f4b7014ad4c9f7cd5ab36e1b07952e64be (diff) |
text_import: Argument with 'nonnull' attribute passed null found by Clang Analyzer
Change-Id: Ie070aa0f58cca156661ddd5689596e29ad56b128
Reviewed-on: https://code.wireshark.org/review/12412
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/text_import.c')
-rw-r--r-- | ui/text_import.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/text_import.c b/ui/text_import.c index d7f4b2dcac..f320eb5e42 100644 --- a/ui/text_import.c +++ b/ui/text_import.c @@ -566,6 +566,10 @@ append_to_preamble(char *str) /* Add a blank separator between the previous token and this token. */ packet_preamble[packet_preamble_len++] = ' '; } + if(str == NULL){ + fprintf(stderr, "FATAL ERROR: str is NULL\n"); + exit(1); + } toklen = strlen(str); if (toklen != 0) { if (packet_preamble_len + toklen > PACKET_PREAMBLE_MAX_LEN) |