This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/libdm/regex parse_rx.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2010-04-22 14:33:16

Modified files:
	libdm/regex    : parse_rx.c 

Log message:
	Don't walk rightmost through NULL pointers.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/regex/parse_rx.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8

--- LVM2/libdm/regex/parse_rx.c	2010/04/22 13:42:34	1.7
+++ LVM2/libdm/regex/parse_rx.c	2010/04/22 14:33:14	1.8
@@ -16,8 +16,6 @@
 #include "dmlib.h"
 #include "parse_rx.h"
 
-#include <ctype.h>
-
 struct parse_sp {		/* scratch pad for the parsing process */
 	struct dm_pool *mem;
 	int type;		/* token type, 0 indicates a charset */
@@ -345,7 +343,7 @@
 {
 	int count = 1;
 
-	while (r->type != CHARSET) {
+	while (r->type != CHARSET && LEFT(r)) {
 		count++;
 		r = LEFT(r);
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]