summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing/random.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-12-28 17:03:40 -0800
committerGitHub <noreply@github.com>2021-12-28 17:03:40 -0800
commit3352e23d5aea9c8fc24147ae6210c7fcee2db0fc (patch)
treee4a198be5f2beecdac7b0ef70ba3dd5bf2364aeb /src/tools/fuzzing/random.cpp
parentdb23896425e78fbccff5ac3e4ec1799097cf3cac (diff)
downloadbinaryen-3352e23d5aea9c8fc24147ae6210c7fcee2db0fc.tar.gz
binaryen-3352e23d5aea9c8fc24147ae6210c7fcee2db0fc.tar.bz2
binaryen-3352e23d5aea9c8fc24147ae6210c7fcee2db0fc.zip
[Fuzzer] Allow empty data in --translate-to-fuzz (#4406)
When a parameter and a member variable have the same name within a constructor, to access (and change) the member variable, we need to either use `this->` or change the name of the parameter. The current code ended up changing the parameter and didn't affect the status of the member variable, which remained empty.
Diffstat (limited to 'src/tools/fuzzing/random.cpp')
-rw-r--r--src/tools/fuzzing/random.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/fuzzing/random.cpp b/src/tools/fuzzing/random.cpp
index 3d8297c15..8beda478b 100644
--- a/src/tools/fuzzing/random.cpp
+++ b/src/tools/fuzzing/random.cpp
@@ -20,8 +20,8 @@
namespace wasm {
-Random::Random(std::vector<char>&& bytes, FeatureSet features)
- : bytes(std::move(bytes)), features(features) {
+Random::Random(std::vector<char>&& bytes_, FeatureSet features)
+ : bytes(std::move(bytes_)), features(features) {
// Ensure there is *some* input to be read.
if (bytes.empty()) {
bytes.push_back(0);