From: Andrew Wong <andrew.kw.w@gmail.com>
To: git@vger.kernel.org
Cc: Andrew Wong <andrew.kw.w@gmail.com>
Subject: [PATCH 2/2] setup.c: Check that the pathspec magic ends with ")"
Date: Sat, 9 Mar 2013 18:46:00 -0500 [thread overview]
Message-ID: <1362872760-25803-2-git-send-email-andrew.kw.w@gmail.com> (raw)
In-Reply-To: <1362872760-25803-1-git-send-email-andrew.kw.w@gmail.com>
The previous code allowed the ")" to be optional.
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
---
setup.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/setup.c b/setup.c
index f4c4e73..5ed2b93 100644
--- a/setup.c
+++ b/setup.c
@@ -225,8 +225,9 @@ static const char *prefix_pathspec(const char *prefix, int prefixlen, const char
die("Invalid pathspec magic '%.*s' in '%s'",
(int) len, copyfrom, elt);
}
- if (*copyfrom == ')')
- copyfrom++;
+ if (*copyfrom != ')')
+ die("Missing ')' at the end of pathspec magic in '%s'", elt);
+ copyfrom++;
} else {
/* shorthand */
for (copyfrom = elt + 1;
--
1.7.12.4
prev parent reply other threads:[~2013-03-09 23:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 16:36 [PATCH] setup.c: Fix prefix_pathspec from looping pass end of string Andrew Wong
2013-03-07 21:48 ` Junio C Hamano
2013-03-07 22:25 ` Andrew Wong
2013-03-07 23:59 ` Junio C Hamano
2013-03-08 0:25 ` Andrew Wong
2013-03-08 1:51 ` Junio C Hamano
2013-03-08 1:58 ` Andrew Wong
2013-03-09 23:45 ` [PATCH 1/2] " Andrew Wong
2013-03-09 23:46 ` Andrew Wong [this message]
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=1362872760-25803-2-git-send-email-andrew.kw.w@gmail.com \
--to=andrew.kw.w@gmail.com \
--cc=git@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).