onnxruntime
b9035574 - Add missing attribute array validation for TreeEnsembleClassifier (#27571)

Commit
4 days ago
Add missing attribute array validation for TreeEnsembleClassifier (#27571) ### Description The `TreeEnsembleAttributesV3` constructor in `tree_ensemble_attribute.h` had 15 `ORT_ENFORCE` size-validation checks in the regressor path but none in the classifier path. A malformed ONNX model with mismatched `TreeEnsembleClassifier` attribute arrays (e.g., `class_ids` vs `class_nodeids`) could cause out-of-bounds access. To fix this, moved all `ORT_ENFORCE` validation checks out of the `else` (regressor) branch so they apply to **both** classifier and regressor paths.
Author
Parents
Loading