From 881a270e582ab8965f558e782891c50c54843c07 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 26 Oct 2024 17:35:07 -0600 Subject: [PATCH] LibWeb: Verify buffer type in WebIDL get buffer source copy AO --- Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp b/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp index 2ca54bfc47b..5acfdb3e6e1 100644 --- a/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp +++ b/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp @@ -76,6 +76,7 @@ ErrorOr get_buffer_source_copy(JS::Object const& buffer_source) // 6. Otherwise: else { // 1. Assert: esBufferSource is an ArrayBuffer or SharedArrayBuffer object. + VERIFY(is(buffer_source)); auto const& es_buffer_source = static_cast(buffer_source); es_array_buffer = &const_cast(es_buffer_source);