Reject unsupported parsed PPI blend modes
This commit is contained in:
@@ -383,6 +383,11 @@ pp::foundation::Result<PpiBodySummary> parse_ppi_body_impl(
|
||||
pp::foundation::Status::invalid_argument("PPI layer boolean field is invalid"));
|
||||
}
|
||||
|
||||
if (blend_mode.value() > 4U) {
|
||||
return pp::foundation::Result<PpiBodySummary>::failure(
|
||||
pp::foundation::Status::out_of_range("PPI layer blend mode is outside the supported range"));
|
||||
}
|
||||
|
||||
if (index != nullptr) {
|
||||
layer_summary.blend_mode = blend_mode.value();
|
||||
layer_summary.alpha_locked = alpha_locked.value() != 0U;
|
||||
|
||||
Reference in New Issue
Block a user