Commit 291f96f792 for ffmpeg
commit 291f96f7929f5837dc900adef3720025516e8584
Author: zhang xingxing <2388969553@qq.com>
Date: Mon Sep 21 06:14:25 2026 +0200
avfilter/vf_libopencv: unmap the shape file on column overflow
Fixes: memleak
Fixes: ZbzgLVrnEIkH
Fixes: swarm-File-mapping-leak-on-column-overflow-early-return-06d09a
diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index 5552fab1b8..b8366a00c7 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -150,7 +150,8 @@ static int read_shape_from_file(int *cols, int *rows, int **values, const char *
w = 0;
} else if (w == INT_MAX) {
av_log(log_ctx, AV_LOG_ERROR, "Overflow on the number of columns in the file\n");
- return AVERROR_INVALIDDATA;
+ ret = AVERROR_INVALIDDATA;
+ goto end;
}
w++;
}