wgpu/tests
Erich Gubler 9747a0ed23 fix: always check buffer clear offset for OOB
Fuzz testing in Firefox encountered crashes for calls of
`Global::command_encoder_clear_buffer` where:

* `offset` is greater than `buffer.size`, but…
* `size` is `None`.

Oops! We should _always_ check this (i.e., even when `size` is `None`),
because we have no guarantee that `offset` and the fallback value of
`size` is in bounds. 😅 So, we change validation here to unconditionally
compute `size` and run checks we previously gated behind `if let
Some(size) = size { … }`.

For convenience, the spec. link for this method:
<https://gpuweb.github.io/gpuweb/#dom-gpucommandencoder-clearbuffer>
2024-02-26 09:32:26 -05:00
..
src Remove GPU based validation in Tests (#5271) 2024-02-19 17:04:03 -05:00
tests fix: always check buffer clear offset for OOB 2024-02-26 09:32:26 -05:00
Cargo.toml Feature/serde feature (#5149) 2024-01-28 20:13:04 +00:00