]> git.sesse.net Git - vlc/commitdiff
fb: fix pointer arithmetic (cid #1048983)
authorRémi Duraffort <ivoire@videolan.org>
Sun, 19 Jan 2014 17:05:12 +0000 (18:05 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 19 Jan 2014 17:10:53 +0000 (18:10 +0100)
modules/video_output/fb.c

index 78c480aa04b7a775c69dc01dad0f06bf4f751892..8b900253af18f7456ea98c492320bc3c0b4e7ebd 100644 (file)
@@ -602,9 +602,9 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
         sys->fb_cmap.start = 0;
         sys->fb_cmap.len = 256;
         sys->fb_cmap.red = sys->palette;
-        sys->fb_cmap.green = sys->palette + 256 * sizeof(uint16_t);
-        sys->fb_cmap.blue = sys->palette + 2 * 256 * sizeof(uint16_t);
-        sys->fb_cmap.transp = sys->palette + 3 * 256 * sizeof(uint16_t);
+        sys->fb_cmap.green = sys->palette + 256;
+        sys->fb_cmap.blue = sys->palette + 2 * 256;
+        sys->fb_cmap.transp = sys->palette + 3 * 256;
 
         /* Save the colormap */
         ioctl(sys->fd, FBIOGETCMAP, &sys->fb_cmap);