summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-09-06 03:32:45 +0430
committerAndreas Kling <kling@serenityos.org>2021-09-06 01:53:26 +0200
commitd20fc922c51674a7d05021e4307faf3b5f7d96f9 (patch)
treeaf93eec794d94f1fec03fcd6f70be404ae8d3cb5 /Meta/Lagom/Fuzzers
parent97e97bccab085823d1365cb54142fd8c41dbcd8c (diff)
downloadserenity-d20fc922c51674a7d05021e4307faf3b5f7d96f9.zip
Meta: Correct misuse of ByteBuffer::resize() as grow() in FuzziliJS
Diffstat (limited to 'Meta/Lagom/Fuzzers')
-rw-r--r--Meta/Lagom/Fuzzers/FuzzilliJs.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp
index ea8824d6dc..74754fb5c3 100644
--- a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp
+++ b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp
@@ -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);