Fix buffer overflow while printing unhandled exception (#2710)

Fixes #2675

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2019-01-21 12:22:27 +01:00
committed by Robert Sipka
parent 77767c2161
commit 772a88050b
+1 -1
View File
@@ -210,7 +210,7 @@ print_unhandled_exception (jerry_value_t error_value) /**< error value */
unsigned int pos = 0;
/* 2. seek and print */
while (buffer[pos] != '\0')
while ((pos < JERRY_BUFFER_SIZE) && (buffer[pos] != '\0'))
{
if (buffer[pos] == '\n')
{