Skip to content

Commit c5f18b4

Browse files
committed
fix: correct base64 data URI segment count validation in readImage
1 parent 1b7363d commit c5f18b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native-executorch/common/rnexecutorch/data_processing/ImageProcessing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ cv::Mat readImage(const std::string &imageURI) {
8686
while (std::getline(uriStream, stringData, ',')) {
8787
++segmentIndex;
8888
}
89-
if (segmentIndex != 1) {
89+
if (segmentIndex != 2) {
9090
throw RnExecutorchError(RnExecutorchErrorCode::FileReadFailed,
9191
"Read image error: invalid base64 URI");
9292
}

0 commit comments

Comments
 (0)