From c5f18b4987601584929cc409fcbcfd472e2c0da1 Mon Sep 17 00:00:00 2001 From: ionkorol Date: Sun, 15 Feb 2026 12:10:54 -0500 Subject: [PATCH] fix: correct base64 data URI segment count validation in readImage --- .../common/rnexecutorch/data_processing/ImageProcessing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-executorch/common/rnexecutorch/data_processing/ImageProcessing.cpp b/packages/react-native-executorch/common/rnexecutorch/data_processing/ImageProcessing.cpp index ab28d1263..e5c484a19 100644 --- a/packages/react-native-executorch/common/rnexecutorch/data_processing/ImageProcessing.cpp +++ b/packages/react-native-executorch/common/rnexecutorch/data_processing/ImageProcessing.cpp @@ -86,7 +86,7 @@ cv::Mat readImage(const std::string &imageURI) { while (std::getline(uriStream, stringData, ',')) { ++segmentIndex; } - if (segmentIndex != 1) { + if (segmentIndex != 2) { throw RnExecutorchError(RnExecutorchErrorCode::FileReadFailed, "Read image error: invalid base64 URI"); }