From 745da82cd61fd750f80ea80d3f6e93d863369b4b Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Tue, 17 Jun 2025 12:02:36 +0900 Subject: [PATCH] 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. --- core/iwasm/libraries/wasi-nn/src/wasi_nn_openvino.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/iwasm/libraries/wasi-nn/src/wasi_nn_openvino.c b/core/iwasm/libraries/wasi-nn/src/wasi_nn_openvino.c index d6aef67fe..449839bdf 100644 --- a/core/iwasm/libraries/wasi-nn/src/wasi_nn_openvino.c +++ b/core/iwasm/libraries/wasi-nn/src/wasi_nn_openvino.c @@ -225,12 +225,6 @@ load(void *ctx, graph_builder_array *builder, graph_encoding encoding, graph_builder xml = builder->buf[0]; graph_builder weight = builder->buf[1]; - /* if xml is a String with a model in IR */ - if (!(xml.buf[xml.size] == '\0' && xml.buf[xml.size - 1] != '\0')) { - NN_ERR_PRINTF("Invalid xml string."); - return invalid_argument; - } - /* transfer weight to an ov tensor */ { ov_ctx->weight_data = os_malloc(weight.size);