This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 9552eb6b01711ece77a7f2e6166e7a47673baefa
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Nov 6 03:59:29 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Sun Nov 8 00:06:10 2026 +0000

    avfilter/vf_selectivecolor: unmap the psfile with the mapped pointer and 
size
    
    Fixes: xFNgu3kY8YOa
    
    Found during review of the fix for the security report urb6qL5xnaVD
    The same fix for vf_curves is in PR #25298 by Martin Mirchev.
    
    Leaked file mapping Replicated through UnModified FFmpeg with strace
---
 libavfilter/vf_selectivecolor.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c
index 6d27bdacb0..2da97dfd4b 100644
--- a/libavfilter/vf_selectivecolor.c
+++ b/libavfilter/vf_selectivecolor.c
@@ -186,13 +186,15 @@ static int parse_psfile(AVFilterContext *ctx, const char 
*fname)
 {
     int16_t val;
     int ret, i, version;
-    uint8_t *buf;
-    size_t size;
+    uint8_t *map, *buf;
+    size_t map_size, size;
     SelectiveColorContext *s = ctx->priv;
 
-    ret = av_file_map(fname, &buf, &size, 0, NULL);
+    ret = av_file_map(fname, &map, &map_size, 0, NULL);
     if (ret < 0)
         return ret;
+    buf  = map;
+    size = map_size;
 
 #define READ16(dst) do {                \
     if (size < 2) {                     \
@@ -235,7 +237,7 @@ static int parse_psfile(AVFilterContext *ctx, const char 
*fname)
     }
 
 end:
-    av_file_unmap(buf, size);
+    av_file_unmap(map, map_size);
     return ret;
 }
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to