[SCM] libav/experimental: Fix the logic to access the location of a string to free when setting a new value for a string with av_set_string2(). Fix a segmentation fault.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:25:18 UTC 2013


The following commit has been merged in the experimental branch:
commit f96905899866738460d52241ddec729aa1ddeca1
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date:   Sun Jul 13 21:28:17 2008 +0000

    Fix the logic to access the location of a string to free when setting
    a new value for a string with av_set_string2(). Fix a segmentation
    fault.
    
    Originally committed as revision 14219 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index 3e10380..acf94ba 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -196,7 +196,7 @@ const AVOption *av_set_string2(void *obj, const char *name, const char *val, int
     }
 
     if(alloc){
-        av_free((void*)(((uint8_t*)obj) + o->offset));
+        av_free(*(void**)(((uint8_t*)obj) + o->offset));
         val= av_strdup(val);
     }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list