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:
@@ -210,7 +210,7 @@ print_unhandled_exception (jerry_value_t error_value) /**< error value */
|
|||||||
unsigned int pos = 0;
|
unsigned int pos = 0;
|
||||||
|
|
||||||
/* 2. seek and print */
|
/* 2. seek and print */
|
||||||
while (buffer[pos] != '\0')
|
while ((pos < JERRY_BUFFER_SIZE) && (buffer[pos] != '\0'))
|
||||||
{
|
{
|
||||||
if (buffer[pos] == '\n')
|
if (buffer[pos] == '\n')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user