Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential bug (Missing initialization of some structures) #801

Closed
ManSoSec opened this issue Sep 30, 2019 · 1 comment
Closed

Potential bug (Missing initialization of some structures) #801

ManSoSec opened this issue Sep 30, 2019 · 1 comment
Assignees

Comments

@ManSoSec
Copy link

We noticed the following inconsistencies in tcpdump.

https:/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:/the-tcpdump-group/tcpdump/blob/master/print-juniper.c#L615
ndo->ndo_protocol = "juniper_monitor"; l2info.pictype = DLT_JUNIPER_MONITOR;
https:/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!

fxlb added a commit to fxlb/tcpdump that referenced this issue Dec 18, 2020
This change fixes the GH issue the-tcpdump-group#801.

Same way as commit 88135db.
@fxlb fxlb changed the title Potential bug (Missing initialization of a pointer) Potential bug (Missing initialization of some structures) Dec 18, 2020
@fxlb
Copy link
Member

fxlb commented Dec 18, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants