Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'maybe unitialized' error #19

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions jerryscript.patch
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,16 @@ index 36c02277..94d0934f 100644
switch (code)
{
case ERR_OUT_OF_MEMORY:
diff --git a/jerry-core/ecma/base/ecma-helpers-string.c b/jerry-core/ecma/base/ecma-helpers-string.c
index 12770f36..5ab67df2 100644
--- a/jerry-core/ecma/base/ecma-helpers-string.c
+++ b/jerry-core/ecma/base/ecma-helpers-string.c
@@ -1835,7 +1835,7 @@ ecma_compare_ecma_strings_longpath (const ecma_string_t *string1_p, /**< ecma-st
const ecma_string_t *string2_p) /**< ecma-string */
{
const lit_utf8_byte_t *utf8_string1_p, *utf8_string2_p;
- lit_utf8_size_t string1_size_and_length[2], string2_size_and_length[2];
+ lit_utf8_size_t string1_size_and_length[2]={0}, string2_size_and_length[2]={0};

utf8_string1_p = ecma_compare_get_string_chars (string1_p, string1_size_and_length);
utf8_string2_p = ecma_compare_get_string_chars (string2_p, string2_size_and_length);