[webkit-changes] [WebKit/WebKit] 86fbeb: Intl.Locale.prototype.hourCycles leaks empty JSVal...

Commit Queue noreply at github.com
Tue Nov 8 19:55:55 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 86fbeb6fcd638e2350b09a43dde355f9830e75da
      https://github.com/WebKit/WebKit/commit/86fbeb6fcd638e2350b09a43dde355f9830e75da
  Author: David Degazio <d_degazio at apple.com>
  Date:   2022-11-08 (Tue, 08 Nov 2022)

  Changed paths:
    A JSTests/stress/intl-locale-invalid-hourCycles.js
    M Source/JavaScriptCore/runtime/IntlLocale.cpp

  Log Message:
  -----------
  Intl.Locale.prototype.hourCycles leaks empty JSValue to script
https://bugs.webkit.org/show_bug.cgi?id=247562
rdar://102031379

Reviewed by Mark Lam.

We currently don't check if IntlLocale::hourCycles returns a null JSArray, which allows it
to be encoded as an empty JSValue and exposed to user code. This patch throws a TypeError
when udatpg_open returns a failed status.

* JSTests/stress/intl-locale-invalid-hourCycles.js: Added.
(main):
* Source/JavaScriptCore/runtime/IntlLocale.cpp:
(JSC::IntlLocale::hourCycles):

Canonical link: https://commits.webkit.org/256473@main




More information about the webkit-changes mailing list