mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 851107 - Skip invalid poisoning of inline chars in RegExpExecute; r=sfink
--HG-- rename : content/svg/content/src/SVGFEPointLightElement.cpp => content/svg/content/src/nsSVGFilters.cpp rename : dom/mobilemessage/interfaces/nsIDOMNavigatorMobileMessage.idl => dom/mobilemessage/interfaces/nsIDOMNavigatorSms.idl rename : dom/mobilemessage/interfaces/nsIDOMMobileMessageManager.idl => dom/mobilemessage/interfaces/nsIDOMSmsManager.idl rename : dom/mobilemessage/src/MobileMessageManager.cpp => dom/mobilemessage/src/SmsManager.cpp rename : dom/mobilemessage/src/MobileMessageManager.h => dom/mobilemessage/src/SmsManager.h rename : layout/reftests/flexbox/flexbox-dyn-changeFrameWidth-4-iframe.html => layout/reftests/flexbox/flexbox-dyn-changeFrameWidth-1-iframe.html rename : layout/reftests/flexbox/flexbox-dyn-changeFrameWidth-4-ref.xhtml => layout/reftests/flexbox/flexbox-dyn-changeFrameWidth-1-ref.xhtml rename : layout/reftests/flexbox/flexbox-dyn-changeFrameWidth-4.xhtml => layout/reftests/flexbox/flexbox-dyn-changeFrameWidth-1.xhtml extra : rebase_source : 802eba4a16cea37b5c573c2d87f4ca57bdcbd9e2
This commit is contained in:
parent
bcf4761bed
commit
049f2636b2
@ -559,8 +559,6 @@ js::ExecuteRegExp(JSContext *cx, HandleObject regexp, HandleString string, Match
|
||||
|
||||
/* Step 4. */
|
||||
Value lastIndex = reobj->getLastIndex();
|
||||
|
||||
const jschar *chars = input->chars();
|
||||
size_t length = input->length();
|
||||
|
||||
/* Step 5. */
|
||||
@ -593,6 +591,7 @@ js::ExecuteRegExp(JSContext *cx, HandleObject regexp, HandleString string, Match
|
||||
}
|
||||
|
||||
/* Steps 8-21. */
|
||||
const jschar *chars = input->chars();
|
||||
size_t lastIndexInt(i);
|
||||
RegExpRunStatus status =
|
||||
ExecuteRegExpImpl(cx, res, *re, input, chars, length, &lastIndexInt, matches);
|
||||
|
@ -570,6 +570,9 @@ RegExpRunStatus
|
||||
RegExpShared::executeMatchOnly(JSContext *cx, const jschar *chars, size_t length,
|
||||
size_t *lastIndex, MatchPair &match)
|
||||
{
|
||||
/* These chars may be inline in a string. See bug 846011. */
|
||||
SkipRoot skipChars(cx, &chars);
|
||||
|
||||
/* Compile the code at point-of-use. */
|
||||
if (!compileMatchOnlyIfNecessary(cx))
|
||||
return RegExpRunStatus_Error;
|
||||
|
Loading…
Reference in New Issue
Block a user