Reject unsupported parsed PPI blend modes

This commit is contained in:
2026-06-02 17:39:45 +02:00
parent 52da64fc96
commit 48fdfd849d
4 changed files with 14 additions and 2 deletions

View File

@@ -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;