From 8344395bfd28a1b479f3a08ddbd0f2c2d43876e5 Mon Sep 17 00:00:00 2001 From: "Hong, Yang A" Date: Tue, 14 Apr 2020 09:36:46 +0000 Subject: [PATCH] avoid crash in addLitExpression() fixes github issue #205 --- src/compiler/compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/compiler.cpp b/src/compiler/compiler.cpp index 3382ff42..de6909e7 100644 --- a/src/compiler/compiler.cpp +++ b/src/compiler/compiler.cpp @@ -402,7 +402,7 @@ void addLitExpression(NG &ng, unsigned index, const char *expression, } // Ensure that our pattern isn't too long (in characters). - if (strlen(expression) > cc.grey.limitPatternLength) { + if (expLength > cc.grey.limitPatternLength) { throw CompileError("Pattern length exceeds limit."); }