fuzzers: Fix buffer overrun
Fixed: tint:1005 Change-Id: I3655ee7b54811b55736cbf0e05c63cb27de6cd72 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58391 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
50b6d024d6
commit
8f144a09f6
|
@ -187,7 +187,7 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) {
|
|||
|
||||
#if TINT_BUILD_SPV_READER
|
||||
std::vector<uint32_t> spirv_input(size / sizeof(uint32_t));
|
||||
std::memcpy(spirv_input.data(), data, size);
|
||||
std::memcpy(spirv_input.data(), data, spirv_input.size() * sizeof(uint32_t));
|
||||
|
||||
#endif // TINT_BUILD_SPV_READER
|
||||
|
||||
|
|
Loading…
Reference in New Issue