Changeset 251403 in webkit


Ignore:
Timestamp:
Oct 21, 2019 5:51:26 PM (4 years ago)
Author:
mark.lam@apple.com
Message:

Fix missing exception check in JSON Stringifier.
https://bugs.webkit.org/show_bug.cgi?id=203227
<rdar://problem/56459854>

Reviewed by Keith Miller.

JSTests:

  • stress/missing-exception-check-in-josn-stringifier.js: Added.

Source/JavaScriptCore:

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Stringifier):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r251394 r251403  
     12019-10-21  Mark Lam  <mark.lam@apple.com>
     2
     3        Fix missing exception check in JSON Stringifier.
     4        https://bugs.webkit.org/show_bug.cgi?id=203227
     5        <rdar://problem/56459854>
     6
     7        Reviewed by Keith Miller.
     8
     9        * stress/missing-exception-check-in-josn-stringifier.js: Added.
     10
    1112019-10-21  Saam Barati  <sbarati@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r251400 r251403  
     12019-10-21  Mark Lam  <mark.lam@apple.com>
     2
     3        Fix missing exception check in JSON Stringifier.
     4        https://bugs.webkit.org/show_bug.cgi?id=203227
     5        <rdar://problem/56459854>
     6
     7        Reviewed by Keith Miller.
     8
     9        * runtime/JSONObject.cpp:
     10        (JSC::Stringifier::Stringifier):
     11
    1122019-10-21  Mark Lam  <mark.lam@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r251394 r251403  
    238238            if (isArrayReplacer) {
    239239                m_usingArrayReplacer = true;
    240                 unsigned length = replacerObject->get(exec, vm.propertyNames->length).toUInt32(exec);
     240                JSValue lengthValue = replacerObject->get(exec, vm.propertyNames->length);
     241                RETURN_IF_EXCEPTION(scope, );
     242                unsigned length = lengthValue.toUInt32(exec);
    241243                RETURN_IF_EXCEPTION(scope, );
    242244                for (unsigned i = 0; i < length; ++i) {
Note: See TracChangeset for help on using the changeset viewer.