diff options
author | Moshe Kaplan <me@moshekaplan.com> | 2021-07-25 12:32:27 -0400 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-07-25 17:25:44 +0000 |
commit | 49ca5fa8abeb5a2b1d9e4c3820b0da0a4f39ede4 (patch) | |
tree | 67a762d1865919209307555f1a07a90106e1aa0b /wiretap | |
parent | 120b4c7e7811882dcd51c838842c9352dcdc0920 (diff) |
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.
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/nettrace_3gpp_32_423.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wiretap/nettrace_3gpp_32_423.c b/wiretap/nettrace_3gpp_32_423.c index ea3befed18..cad5b844cf 100644 --- a/wiretap/nettrace_3gpp_32_423.c +++ b/wiretap/nettrace_3gpp_32_423.c @@ -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; |