r11131 - prelude-lml/trunk/plugins/pcre

[email protected]
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
Author: yoann
Date: 2009-04-09 11:36:21 +0200 (Thu, 09 Apr 2009)
New Revision: 11131

Modified:
   prelude-lml/trunk/plugins/pcre/value-container.c
Log:
Fixes possible off by one when parsing variable reference number. Thanks
Steve Grubb <[email protected]> for reporting this problem (and running
flexelint on the Prelude sources)!

Modified: prelude-lml/trunk/plugins/pcre/value-container.c
===================================================================
--- prelude-lml/trunk/plugins/pcre/value-container.c	2009-04-09 08:23:57 UTC (rev 11130)
+++ prelude-lml/trunk/plugins/pcre/value-container.c	2009-04-09 09:36:21 UTC (rev 11131)
@@ -117,7 +117,7 @@
                         i = 0;
                         str++;
 
-                        while ( isdigit((int) *str) && i < sizeof(num) )
+                        while ( isdigit((int) *str) && i < (sizeof(num) - 1) )
                                 num[i++] = *str++;
 
                         if ( ! i )

_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.