Skip to content

Commit 745da82

Browse files
authored
wasi_nn_openvino.c: remove broken xml check (#4365)
`xml.buf[xml.size]` check is broken because it accesses past the end of the buffer. anyway, openvino doesn't seem to care the NUL termination.
1 parent 7bbdbf5 commit 745da82

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

core/iwasm/libraries/wasi-nn/src/wasi_nn_openvino.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,6 @@ load(void *ctx, graph_builder_array *builder, graph_encoding encoding,
225225
graph_builder xml = builder->buf[0];
226226
graph_builder weight = builder->buf[1];
227227

228-
/* if xml is a String with a model in IR */
229-
if (!(xml.buf[xml.size] == '\0' && xml.buf[xml.size - 1] != '\0')) {
230-
NN_ERR_PRINTF("Invalid xml string.");
231-
return invalid_argument;
232-
}
233-
234228
/* transfer weight to an ov tensor */
235229
{
236230
ov_ctx->weight_data = os_malloc(weight.size);

0 commit comments

Comments
 (0)