the-tcpdump-group / tcpdump

the TCPdump network dissector

Home Page:https://www.tcpdump.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential bug (Missing initialization of some structures)

ManSoSec opened this issue · comments

We noticed the following inconsistencies in tcpdump.

https://github.com/the-tcpdump-group/tcpdump/blob/master/print-juniper.c#L884

ndo->ndo_protocol = "juniper_mfr"; memset(&l2info, 0, sizeof(l2info)); l2info.pictype = DLT_JUNIPER_MFR;

https://github.com/the-tcpdump-group/tcpdump/blob/master/print-juniper.c#L615
ndo->ndo_protocol = "juniper_monitor"; l2info.pictype = DLT_JUNIPER_MONITOR;
https://github.com/the-tcpdump-group/tcpdump/blob/master/print-juniper.c#L486
ndo->ndo_protocol = "juniper_ggsn"; l2info.pictype = DLT_JUNIPER_GGSN;

We think either initializing l2info is missing in the latter cases or memset is unnecessary in the first case.

Thank you!

commented

Thank you!