Skip to content

Commit a3514ce

Browse files
fix: V-004 security vulnerability
Automated security fix generated by OrbisAI Security
1 parent 9cd055b commit a3514ce

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tools/plugin/modules/ov_noise_suppression/noise_suppression_interface.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ extern "C" {
8585
nd->infer_request[i] = compiled_model.create_infer_request();
8686

8787
nd->inp_shape = nd->model->input("input").get_shape();
88+
for (auto dim : nd->inp_shape)
89+
if (!dim || dim > (1u << 24))
90+
return -EINVAL;
8891

8992
return 0;
9093
}
@@ -141,6 +144,9 @@ extern "C" {
141144
ov::Shape state_shape;
142145

143146
state_shape = nd->model->input(inp_state_name).get_shape();
147+
for (auto dim : state_shape)
148+
if (!dim || dim > (1u << 24))
149+
return -EINVAL;
144150
if (nd->iter > 0) {
145151
/*
146152
* set input state by corresponding output state from prev

0 commit comments

Comments
 (0)