mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-05 17:29:43 +08:00
Fix use-after-free in regexp source property access.
The underlying string of the "source" property of a regular expression object can be freed if the regexp is garbage collected. This could lead to a use-after-free, because the accessor incorrectly assumed that the regexp source was an interned (thus never freed) string. Fix this by calling js_pushstring instead of the faster but unsafe js_pushliteral. Many thanks to Connor Nelson for spotting this!
This commit is contained in:
Reference in New Issue
Block a user