From: Mi Jinlong <mijinlong@cn.fujitsu.com>
To: SteveD@redhat.com
Cc: NFSv3 list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] libnfs.a: fix a bug when parse section's arg
Date: Tue, 09 Nov 2010 09:37:19 +0800 [thread overview]
Message-ID: <4CD8A5CF.4050007@cn.fujitsu.com> (raw)
In-Reply-To: <4CD36FE7.1010100@cn.fujitsu.com>
When parsing section's arg at configure file, the pointer
should stop when fetch ']', and give the warning message.
Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
---
support/nfs/conffile.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index 24640f4..798e5f3 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
@@ -271,9 +271,9 @@ conf_parse_line(int trans, char *line, size_t sz)
if (ptr == NULL)
return;
line = ++ptr;
- while (*ptr && *ptr != '"')
+ while (*ptr && *ptr != '"' && *ptr != ']')
ptr++;
- if (*ptr == '\0') {
+ if (*ptr == '\0' || *ptr == ']') {
xlog_warn("config file error: line %d: "
"non-matched '\"', ignoring until next section", ln);
} else {
-- 1.7.0.1
next prev parent reply other threads:[~2010-11-09 1:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 2:45 [PATCH] libnfs.a: fix a bug when parse section's arg Mi Jinlong
2010-11-09 1:37 ` Mi Jinlong [this message]
2010-11-22 17:31 ` Steve Dickson
2010-11-24 9:07 ` Mi Jinlong
2010-11-29 16:06 ` Steve Dickson
2010-11-29 16:06 ` Steve Dickson
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=4CD8A5CF.4050007@cn.fujitsu.com \
--to=mijinlong@cn.fujitsu.com \
--cc=SteveD@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).