mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
Meta: Correct misuse of ByteBuffer::resize() as grow() in FuzziliJS
This commit is contained in:
parent
97e97bccab
commit
d20fc922c5
Notes:
sideshowbarker
2024-07-18 04:39:36 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/d20fc922c51 Pull-request: https://github.com/SerenityOS/serenity/pull/9832 Reviewed-by: https://github.com/IdanHo
1 changed files with 1 additions and 2 deletions
|
@ -206,8 +206,7 @@ int main(int, char**)
|
|||
VERIFY(read(REPRL_CRFD, &script_size, 8) == 8);
|
||||
VERIFY(script_size < REPRL_MAX_DATA_SIZE);
|
||||
ByteBuffer data_buffer;
|
||||
if (data_buffer.size() < script_size)
|
||||
data_buffer.resize(script_size - data_buffer.size());
|
||||
data_buffer.resize(script_size);
|
||||
VERIFY(data_buffer.size() >= script_size);
|
||||
memcpy(data_buffer.data(), reprl_input, script_size);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue