FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 12-07-2007, 10:57 PM
 
Default multipath-tools/libmultipath parser.c

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 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

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/parser.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r 1=1.18&r2=1.18.2.1

--- multipath-tools/libmultipath/parser.c 2006/06/06 18:32:43 1.18
+++ multipath-tools/libmultipath/parser.c 2007/12/07 23:57:03 1.18.2.1
@@ -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, <acassen@linux-vs.org>
*
@@ -203,7 +203,7 @@
cp = string;

/* Skip white spaces */
- while (isspace((int) *cp) && *cp != '')
+ while ((isspace((int) *cp) || !isascii((int) *cp)) && *cp != '')
cp++;

/* Return if there is only white spaces */
@@ -241,8 +241,10 @@
in_string = 1;

} else {
- while ((in_string || !isspace((int) *cp)) && *cp
- != '' && *cp != '"')
+ while ((in_string ||
+ (!isspace((int) *cp) && isascii((int) *cp) &&
+ *cp != '!' && *cp != '#')) &&
+ *cp != '' && *cp != '"')
cp++;
strlen = cp - start;
token = MALLOC(strlen + 1);
@@ -255,7 +257,8 @@
}
vector_set_slot(strvec, token);

- while (isspace((int) *cp) && *cp != '')
+ while ((isspace((int) *cp) || !isascii((int) *cp))
+ && *cp != '')
cp++;
if (*cp == '' || *cp == '!' || *cp == '#')
return strvec;

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 04:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org