[Snort-users] zero initialization in DecodeEthPkt()

Victor Roemer vroemer at ...1935...
Mon Jun 18 09:20:22 EDT 2012


Comments inline


On Mon, Jun 18, 2012 at 2:27 AM, J.Hwan Kim <frog1120 at ...11827...> wrote:

> Hi, everyone
>
> There is a zero initialization routine of Packet structure in
> DecodeEthPkt().
> memset(p, 0, PKT_ZERO_LEN);
>
> Is the routine necessary?
>
Yes


> What will happen if I remove the routine?
>
Unexpected behavior, more specifically without the memset the values
contained in 'p' would be whatever was in memory at the time.


>
> Thanks in advance.
>
> Best Regards,
> J.Hwan Kim
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Snort-users mailing list
> Snort-users at lists.sourceforge.net
> Go to this URL to change user options or unsubscribe:
> https://lists.sourceforge.net/lists/listinfo/snort-users
> Snort-users list archive:
> http://www.geocrawler.com/redir-sf.php3?list=snort-users
>
> Please visit http://blog.snort.org to stay current on all the latest
> Snort news!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20120618/99f0e474/attachment.html>


More information about the Snort-users mailing list