The UTF8 buffer size can be smaller then the CESU8 string's size so the UTF8 output is may truncated. Therefore we cannot ensure that the CESU8 buffer is read until the end.
This patch fixesjerryscript-project#4920.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
The UTF8 buffer size can be smaller then the CESU8 string's size so the UTF8 output is may truncated. Therefore we cannot ensure that the CESU8 buffer is read until the end.
This patch fixes#4920.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
JerryScript revision
Commit: a6ab5e9
Version: v3.0.0
Build platform
Ubuntu 18.04.5 LTS (Linux 4.19.128-microsoft-standard x86_64)
Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)
Build steps
Test case
poc.js
Execution steps & Output
$ ./jerryscript/build/bin/jerry poc.js ICE: Assertion 'cesu8_cursor_p == cesu8_end_p' failed at /jerryscript/jerry-core/lit/lit-strings.c(lit_convert_cesu8_string_to_utf8_string):868. Error: ERR_FAILED_INTERNAL_ASSERTION [1] abort jerry poc.jsCredits: Found by OWL337 team.
The text was updated successfully, but these errors were encountered: