Skip to contentSkip to conversation

multipath-tools/libmultipath parser.c

PATCH [email protected] 1 participant 1 message Oct 12, 2007 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL4_FC5
Changes by: [email protected] 2007-10-12 17:18:14

Modified files:
libmultipath : parser.c

Log message:
Oops. Missed a spot with the ascii checking.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/parser.c.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.17.2.1&r2=1.17.2.2

libmultipath/parser.c +5 -3
@@ -2,7 +2,7 @@
  * Part:        Configuration file parser/reader. Place into the dynamic
  *              data structure representation the conf file
  *  
- * Version:     $Id: parser.c,v 1.17.2.1 2007/10/11 20:17:17 bmarzins Exp $
+ * Version:     $Id: parser.c,v 1.17.2.2 2007/10/12 17:18:14 bmarzins Exp $
  * 
  * Author:      Alexandre Cassen, <[email protected]>
  *              
@@ -157,8 +157,10 @@
 				in_string = 1;
 
 		} else {
-			while ((in_string || !isspace((int) *cp)) && *cp
-				!= '\0' && *cp != '"')
+			while ((in_string ||
+				(!isspace((int) *cp) && isascii((int) *cp) &&
+				 *cp != '!' && *cp != '#')) &&
+			       *cp != '\0' && *cp != '"')
 				cp++;
 			strlen = cp - start;
 			token = MALLOC(strlen + 1);