summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Coutand2012-04-16 09:02:16 (EDT)
committer Eugene Tarassov2012-04-16 15:17:29 (EDT)
commit161218547d8948da5591046ba45982a99eb5b2cc (patch)
tree060099a597d4e13a9243619516ed87866158d596
parent48b5ab28918ffbd5392a6e74236a843a3ac9a521 (diff)
downloadorg.eclipse.tcf.agent-161218547d8948da5591046ba45982a99eb5b2cc.zip
org.eclipse.tcf.agent-161218547d8948da5591046ba45982a99eb5b2cc.tar.gz
org.eclipse.tcf.agent-161218547d8948da5591046ba45982a99eb5b2cc.tar.bz2
Fix bug in context query parsing of escaped characters.
-rw-r--r--agent/tcf/services/contextquery.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/agent/tcf/services/contextquery.c b/agent/tcf/services/contextquery.c
index f3226d8..9e01844 100644
--- a/agent/tcf/services/contextquery.c
+++ b/agent/tcf/services/contextquery.c
@@ -115,10 +115,7 @@ int parse_context_query(const char * q) {
while (*q != '"') {
if (*q == '\\') {
q++;
- if (*q == '\\' || *q == '"') {
- add_char(*q++);
- }
- else {
+ if (*q != '\\' && *q != '"') {
set_errno(ERR_OTHER, "Invalid context query syntax: \" and \\ are the only characters that can be escaped");
return -1;
}