From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools/libmultipath parser.c
Date: 7 Dec 2007 23:57:05 -0000 [thread overview]
Message-ID: <20071207235705.5597.qmail@sourceware.org> (raw)
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&r1=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 != '\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;
next reply other threads:[~2007-12-07 23:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 23:57 bmarzins [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-12 17:18 multipath-tools/libmultipath parser.c bmarzins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071207235705.5597.qmail@sourceware.org \
--to=bmarzins@sourceware.org \
--cc=dm-cvs@sourceware.org \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.