Index: test/fuzzer/wasm-compile.cc |
diff --git a/test/fuzzer/wasm-compile.cc b/test/fuzzer/wasm-compile.cc |
index 8d70c1c3e2a9a96901b0124265f9cd639fe2a7df..5edac0af8b9164173e33b7867c267034ce5769da 100644 |
--- a/test/fuzzer/wasm-compile.cc |
+++ b/test/fuzzer/wasm-compile.cc |
@@ -59,7 +59,7 @@ class DataRange { |
} else { |
const size_t num_bytes = std::min(sizeof(T), size()); |
T result; |
- memcpy(&result, data_, sizeof(num_bytes)); |
+ memcpy(&result, data_, num_bytes); |
data_ += num_bytes; |
size_ -= num_bytes; |
return result; |