Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-12-02 17:01:48 -0500
committerEugene Tarassov2013-12-02 17:07:33 -0500
commit40e3a1e8d769ccc4e670cacafa82d5a3b69c8b6a (patch)
tree363482410dabb58b221109e5d4cd1882b0d142cf
parent87dc9fbfde29e3c771536dc7c56557e3e4f37807 (diff)
downloadorg.eclipse.tcf.agent-40e3a1e8d769ccc4e670cacafa82d5a3b69c8b6a.tar.gz
org.eclipse.tcf.agent-40e3a1e8d769ccc4e670cacafa82d5a3b69c8b6a.tar.xz
org.eclipse.tcf.agent-40e3a1e8d769ccc4e670cacafa82d5a3b69c8b6a.zip
Bug 422666 - Parsing expressions containing a odd number double quote character is an infinite loop
-rw-r--r--agent/tcf/services/expressions.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/agent/tcf/services/expressions.c b/agent/tcf/services/expressions.c
index f777fa9b..14f2fbc0 100644
--- a/agent/tcf/services/expressions.c
+++ b/agent/tcf/services/expressions.c
@@ -267,7 +267,10 @@ static int next_dec(void) {
static int next_char_val(void) {
int n = 0;
- if (text_ch == '\\') {
+ if (text_ch == 0) {
+ error(ERR_INV_EXPRESSION, "Unexpected end of expression");
+ }
+ else if (text_ch == '\\') {
next_ch();
switch (text_ch) {
case 'n' : n = '\n'; break;

Back to the top