Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JSC] Fix ResizableArrayBuffer + lastIndexOf
https://bugs.webkit.org/show_bug.cgi?id=249676 rdar://103531814 Reviewed by Justin Michaud. When evaluating the valueOf of the input, resizable arraybuffer can get 0 length, thus, we need to assume that length can become zero. This patch fixes this crash issue. This is actually not a security issue because of how resizable arraybuffer is designed: it reserves maximum size VM region and use mprotect to allow access based on the current size. So, only possible outcome here is crash. * JSTests/stress/resizable-array-buffer-last-index-of.js: Added. (evil.valueOf): * Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h: (JSC::genericTypedArrayViewProtoFuncLastIndexOf): Canonical link: https://commits.webkit.org/258164@main
- Loading branch information