[vlc-commits] demux: avi: int_max is flipped range

Francois Cartegnie git at videolan.org
Mon Oct 14 21:10:35 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Oct 14 20:36:15 2019 +0200| [0d2b0a46700b9aa363d0d76e508c63e17420996e] | committer: Francois Cartegnie

demux: avi: int_max is flipped range

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

 modules/demux/avi/bitmapinfoheader.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/avi/bitmapinfoheader.h b/modules/demux/avi/bitmapinfoheader.h
index ef119bd270..ed2ce0ae2c 100644
--- a/modules/demux/avi/bitmapinfoheader.h
+++ b/modules/demux/avi/bitmapinfoheader.h
@@ -176,6 +176,10 @@ static inline int ParseBitmapInfoHeader( VLC_BITMAPINFOHEADER *p_bih, size_t i_b
         p_props->i_stride = p_bih->biWidth * (p_bih->biBitCount >> 3);
         /* RGB DIB are coded from bottom to top */
         if ( p_bih->biHeight < INT32_MAX ) p_props->b_flipped = true;
+        if ( p_bih->biHeight <= INT32_MAX )
+            p_props->b_flipped = true;
+        /* else
+         *     set below to positive value */
     }
     else /* Compressed codecs */
     {



More information about the vlc-commits mailing list