[vlc-commits] libavi: Fix expension unsafe helper

Hugo Beauzée-Luyssen git at videolan.org
Thu Aug 3 15:33:11 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Aug  3 15:24:46 2017 +0200| [bdb4031e58c68da28e4d9a7b9f60834b7ca4408d] | committer: Hugo Beauzée-Luyssen

libavi: Fix expension unsafe helper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bdb4031e58c68da28e4d9a7b9f60834b7ca4408d
---

 modules/demux/avi/libavi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
index a18c1884ef..c1456a8223 100644
--- a/modules/demux/avi/libavi.c
+++ b/modules/demux/avi/libavi.c
@@ -307,8 +307,10 @@ int AVI_ChunkFetchIndexes( stream_t *s, avi_chunk_t *p_riff )
     p_read += size \
 
 #define AVI_READCHUNK_EXIT( code ) \
-    free( p_buff ); \
-    return code
+    do { \
+        free( p_buff ); \
+        return code; \
+    } while(0)
 
 static inline uint8_t GetB( uint8_t *ptr )
 {



More information about the vlc-commits mailing list