libwiretap: Avoid using uninit variable

Within wiretap/nettrace_3gpp_32_423.c,
set the first byte of the buffer
to a null byte to avoid potentially
accessing uninitiliazed memory.
Fixes Coverity 1471685.
This commit is contained in:
Moshe Kaplan 2021-07-25 12:32:27 -04:00 committed by Wireshark GitLab Utility
parent 120b4c7e78
commit 49ca5fa8ab
1 changed files with 2 additions and 0 deletions

View File

@ -252,6 +252,8 @@ nettrace_msg_to_packet(nettrace_3gpp_32_423_file_info_t *file_info, wtap_rec *re
*err_info = g_strdup_printf("nettrace_3gpp_32_423: Did not start with \"%s\"", c_s_msg);
return FALSE;
}
name_str[0] = '\0';
prev_pos = curr_pos = input + CLEN(c_s_msg);
rec->rec_type = REC_TYPE_PACKET;