forked from osmocom/wireshark
print.c NULL pointer check in print_escaped
Added NULL pointer check in print_escaped functions. Requested by comment in change 16034. Change-Id: Id172d772d9b5cb4bcd31fe8b42286f885ec5b968 Reviewed-on: https://code.wireshark.org/review/16188 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
This commit is contained in:
parent
8c006feeab
commit
670b1199e3
|
@ -1389,6 +1389,10 @@ print_escaped_xml(FILE *fh, const char *unescaped_string)
|
|||
const char *p;
|
||||
char temp_str[8];
|
||||
|
||||
if (fh == NULL || unescaped_string == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (p = unescaped_string; *p != '\0'; p++) {
|
||||
switch (*p) {
|
||||
case '&':
|
||||
|
@ -1423,6 +1427,10 @@ print_escaped_bare(FILE *fh, const char *unescaped_string, gboolean change_dot)
|
|||
const char *p;
|
||||
char temp_str[8];
|
||||
|
||||
if (fh == NULL || unescaped_string == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (p = unescaped_string; *p != '\0'; p++) {
|
||||
switch (*p) {
|
||||
case '"':
|
||||
|
|
Loading…
Reference in New Issue