forked from osmocom/wireshark
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>
This commit is contained in:
parent
cda4b0f4b7
commit
7762ee33da
|
@ -566,6 +566,10 @@ append_to_preamble(char *str)
|
||||||
/* Add a blank separator between the previous token and this token. */
|
/* Add a blank separator between the previous token and this token. */
|
||||||
packet_preamble[packet_preamble_len++] = ' ';
|
packet_preamble[packet_preamble_len++] = ' ';
|
||||||
}
|
}
|
||||||
|
if(str == NULL){
|
||||||
|
fprintf(stderr, "FATAL ERROR: str is NULL\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
toklen = strlen(str);
|
toklen = strlen(str);
|
||||||
if (toklen != 0) {
|
if (toklen != 0) {
|
||||||
if (packet_preamble_len + toklen > PACKET_PREAMBLE_MAX_LEN)
|
if (packet_preamble_len + toklen > PACKET_PREAMBLE_MAX_LEN)
|
||||||
|
|
Loading…
Reference in New Issue