Skip to content

Conversation

@boingoing
Copy link
Contributor

If the code throwing the exception is dynamic (eval or otherwise doesn't have a url) the url of the functionBody can be null. In that case, we would pass null to JavascriptString::NewCopySz which dereferences it and crashes. Fix is to use GetSourceName instead which handles this case providing the string 'eval code' instead of nullptr.

If the code throwing the exception is dynamic (eval or otherwise doesn't have a url) the url of the `functionBody` can be null. In that case, we would pass null to JavascriptString::NewCopySz which dereferences it and crashes. Fix is to use GetSourceName instead which handles this case providing the string 'eval code' instead of nullptr.
@boingoing boingoing requested review from MSLaguana and kfarnung March 6, 2018 01:44
Copy link
Collaborator

@agarwal-sandeep agarwal-sandeep left a comment

Choose a reason for hiding this comment

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

:shipit:

@chakrabot chakrabot merged commit 57b024e into chakra-core:release/1.9 Mar 6, 2018
chakrabot pushed a commit that referenced this pull request Mar 6, 2018
…etadataFromException

Merge pull request #4783 from boingoing:FixPopulateMetadataFromExceptionNull

If the code throwing the exception is dynamic (eval or otherwise doesn't have a url) the url of the `functionBody` can be null. In that case, we would pass null to JavascriptString::NewCopySz which dereferences it and crashes. Fix is to use GetSourceName instead which handles this case providing the string 'eval code' instead of nullptr.
@boingoing
Copy link
Contributor Author

Thanks!

chakrabot pushed a commit that referenced this pull request Mar 6, 2018
… in PopulateMetadataFromException

Merge pull request #4783 from boingoing:FixPopulateMetadataFromExceptionNull

If the code throwing the exception is dynamic (eval or otherwise doesn't have a url) the url of the `functionBody` can be null. In that case, we would pass null to JavascriptString::NewCopySz which dereferences it and crashes. Fix is to use GetSourceName instead which handles this case providing the string 'eval code' instead of nullptr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants