multipath-tools/libmultipath parser.c
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: [email protected] 2007-12-07 23:57:05
Modified files:
libmultipath : parser.c
Log message:
Fix for bz335021. Multipath not ignores nonascii characters in /etc/multipath.conf
libmultipath/parser.c +8 -5
@@ -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.18 2006/06/06 18:32:43 bmarzins Exp $ +* Version: $Id: parser.c,v 1.18.2.1 2007/12/07 23:57:03 bmarzins Exp $ * * Author: Alexandre Cassen, <[email protected]> *
@@ -203,7 +203,7 @@ cp = string;/* Skip white spaces */ -while (isspace ((int ) *cp) && *cp !='\0' ) +while ((isspace ((int ) *cp) || !isascii ((int ) *cp)) && *cp !='\0' ) cp++;/* Return if there is only white spaces */
@@ -241,8 +241,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 );
@@ -255,7 +257,8 @@ }vector_set_slot (strvec, token); -while (isspace ((int ) *cp) && *cp !='\0' ) +while ((isspace ((int ) *cp) || !isascii ((int ) *cp)) + && *cp !='\0' ) cp++;if (*cp =='\0' || *cp =='!' || *cp =='#' )return strvec;