Validate injected errors are not NoError
HandleError assumes that the error is not NoError. InjectError is an untrusted wire command and needs to validate that NoError is not passed. Bug: chromium:1010703, chromium:1004368 Change-Id: Id48a877ded327a6e3a54fedb2be2c54eeca5cd3c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11780 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
0da52f2d92
commit
3fd022ef60
|
@ -102,7 +102,11 @@ namespace dawn_native {
|
|||
if (ConsumedError(ValidateErrorType(type))) {
|
||||
return;
|
||||
}
|
||||
mCurrentErrorScope->HandleError(type, message);
|
||||
if (DAWN_UNLIKELY(type == dawn::ErrorType::NoError)) {
|
||||
HandleError(dawn::ErrorType::Validation, "Invalid injected error NoError");
|
||||
return;
|
||||
}
|
||||
HandleError(type, message);
|
||||
}
|
||||
|
||||
void DeviceBase::ConsumeError(ErrorData* error) {
|
||||
|
|
Loading…
Reference in New Issue