tcpdump mailing list archives

Question about an uninitialized array in bpf_filter


From: Michal Ruprich <michalruprich () gmail com>
Date: Mon, 29 Apr 2024 16:19:04 +0200

Hi,

I was wondering, whether the mem[BPF_MEMWORDS] array in function pcapint_filter_with_aux_data in bpf_filter.c should be initialized? If the switch hits cases BPF_LD|BPF_MEM or BPF_LDX|BPF_MEM the variables A or X are filled with random uninitialized data from the array. Is it the case that this never happens before mem is filled with relevant data? In all cases, setting it to mem[BPF_MEMWORDS] = {0}; could not hurt probably?

Thanks and regards,

Michal Ruprich

_______________________________________________
tcpdump-workers mailing list -- tcpdump-workers () lists tcpdump org
To unsubscribe send an email to tcpdump-workers-leave () lists tcpdump org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


Current thread: