[vlc-commits] Text style: fix integer overflow

Rémi Denis-Courmont git at videolan.org
Mon Apr 14 22:40:34 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 14 23:39:44 2014 +0300| [ec871cc5821888c620e75e081717e4bb871f1a47] | committer: Rémi Denis-Courmont

Text style: fix integer overflow

Occurs when shifting alpha = 255 by 24 bits.

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

 include/vlc_text_style.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/vlc_text_style.h b/include/vlc_text_style.h
index 7398dd4..5167724 100644
--- a/include/vlc_text_style.h
+++ b/include/vlc_text_style.h
@@ -43,7 +43,7 @@ typedef struct
     int        i_font_size;       /**< The font size in pixels */
     int        i_font_color;      /**< The color of the text 0xRRGGBB
                                        (native endianness) */
-    int        i_font_alpha;      /**< The transparency of the text.
+    unsigned   i_font_alpha;      /**< The transparency of the text.
                                        0x00 is fully opaque,
                                        0xFF fully transparent */
     int        i_style_flags;     /**< Formatting style flags */



More information about the vlc-commits mailing list