snort-devel February 2014 archive
Main Archive Page > Month Archives  > snort-devel archives
snort-devel: [Snort-devel] [PATCH]: Fix IP Protocol variable dat

[Snort-devel] [PATCH]: Fix IP Protocol variable data type in Stream5 Preprocessor

From: Joshua Kinard <kumba_at_nospam>
Date: Tue Feb 18 2014 - 06:26:59 GMT
To: snort-devel mailinglist <snort-devel@lists.sourceforge.net>

Hello snort-devel,

I found a few more spots in Stream5 where a 'char' is used to hold the IP
Protocol number, which is wrong. IP proto runs from 0-255, which a char
won't handle, being that it's a signed 8-bit integer. The attached patch
changes this to a uint8_t data type in the affected spots, as well as a few
instances of a signed 32-bit integer in the
s5SetPortFilterStatus/s5UnsetPortFilterStatus function definitions.

 Stream5/snort_stream5_session.c | 4 ++--
 Stream5/snort_stream5_session.h | 2 +-
 Stream5/stream5_ha.c | 2 +-
 spp_stream5.c | 16 ++++++++--------
 stream_api.h | 8 ++++----
 5 files changed, 16 insertions(+), 16 deletions(-)

Cheers!,

-- Joshua Kinard Gentoo/MIPS kumba@gentoo.org 4096R/D25D95E3 2011-03-28 "The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between." --Emperor Turhan, Centauri Republic

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk

_______________________________________________
Snort-devel mailing list
Snort-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/snort-devel
Archive:
http://sourceforge.net/mailarchive/forum.php?forum_name=snort-devel

Please visit http://blog.snort.org for the latest news about Snort!