summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Coutand2012-04-20 05:49:42 (EDT)
committer Eugene Tarassov2012-04-20 14:20:21 (EDT)
commitfc3a574de4f70e377c704fa4d33b47157a355324 (patch)
tree73bdfc94678aaa12732d9306db71cd4eabe568cb
parent2198ec7605c7f2af398624b0d84c6b1448a9a7ee (diff)
downloadorg.eclipse.tcf.agent-fc3a574de4f70e377c704fa4d33b47157a355324.zip
org.eclipse.tcf.agent-fc3a574de4f70e377c704fa4d33b47157a355324.tar.gz
org.eclipse.tcf.agent-fc3a574de4f70e377c704fa4d33b47157a355324.tar.bz2
Fix misshandling of context queries consisting of only an empty string.
-rw-r--r--agent/tcf/services/contextquery.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/agent/tcf/services/contextquery.c b/agent/tcf/services/contextquery.c
index a3cc2a2..0c7ba00 100644
--- a/agent/tcf/services/contextquery.c
+++ b/agent/tcf/services/contextquery.c
@@ -69,15 +69,11 @@ int parse_context_query(const char * q) {
attrs = NULL;
abs_path = 0;
- if (q == NULL) return 0;
+ if ((q == NULL) || (*q == 0)) return 0;
str_max = 64;
str_buf = (char *)tmp_alloc(str_max);
if ((abs_path = *q == '/') != 0) q++;
- if (*q == 0) {
- set_errno(ERR_OTHER, "Invalid context query syntax: missing context name, property or wildcard");
- return -1;
- }
while (*q) {
Attribute * attr = (Attribute *)tmp_alloc_zero(sizeof(Attribute));
for (;;) {