diff options
author | Eugene Tarassov | 2012-05-21 23:01:04 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-05-21 23:01:04 +0000 |
commit | 7c086ff55981bffc09d237e1213a9806e31f6438 (patch) | |
tree | 148064ed0323af3c3abd2ad40f9c626cabb8763a | |
parent | 108e7950e0b49fd960b8cc350afc041bfdde8782 (diff) | |
download | org.eclipse.tcf.agent-7c086ff55981bffc09d237e1213a9806e31f6438.tar.gz org.eclipse.tcf.agent-7c086ff55981bffc09d237e1213a9806e31f6438.tar.xz org.eclipse.tcf.agent-7c086ff55981bffc09d237e1213a9806e31f6438.zip |
TCF Agent: fixed: seg fault when context query string lacks closing quite character
-rw-r--r-- | agent/tcf/services/contextquery.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/agent/tcf/services/contextquery.c b/agent/tcf/services/contextquery.c index 0c7ba000..903893d3 100644 --- a/agent/tcf/services/contextquery.c +++ b/agent/tcf/services/contextquery.c @@ -103,7 +103,8 @@ int parse_context_query(const char * q) { break; } } - } else { + } + else { while (*q) { if ((*q != '_') && (((*q < '0') || (*q > '9')) && @@ -131,6 +132,10 @@ int parse_context_query(const char * q) { return -1; } } + else if (*q == 0) { + set_errno(ERR_OTHER, "Invalid context query syntax: missing closing quote character"); + return -1; + } add_char(*q++); } q++; |