Skip to content

Fix 'Segmentation fault on String.Replace' #852

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

Merged

Conversation

LaszloLango
Copy link
Contributor

Related issue: #747

JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]

@LaszloLango LaszloLango added bug Undesired behaviour ecma builtins Related to ECMA built-in routines labels Feb 8, 2016
ssize_t sz = ecma_string_to_utf8_string (input_string_p, input_buffer_p, (ssize_t) input_string_size);
JERRY_ASSERT (sz >= 0);

lit_utf8_byte_t *input_curr_p = input_buffer_p;
re_ctx.input_start_p = input_buffer_p;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I'd like to be picky -- which I'm obviously not :) -- then I'd suggest moving this in the else branch of if (!input_string_size).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obviously :) It would look better, so I'll do it. :)

@LaszloLango
Copy link
Contributor Author

@akiss77, I've updeted the patch. Please check.

@akosthekiss
Copy link
Member

LGTM (informally)

@zherczeg
Copy link
Member

zherczeg commented Feb 9, 2016

LGTM

Related issue: jerryscript-project#747

JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
@LaszloLango LaszloLango merged commit 6b8332e into jerryscript-project:master Feb 9, 2016
@LaszloLango LaszloLango deleted the fix-regression-747 branch February 17, 2016 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour ecma builtins Related to ECMA built-in routines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants