[vlc-commits] fb: fix pointer arithmetic (cid #1048983)

Rémi Duraffort git at videolan.org
Sun Jan 19 18:12:54 CET 2014


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jan 19 18:05:12 2014 +0100| [6ff63c369fc0336e7484f98d9c7f50650af2ecd9] | committer: Rémi Duraffort

fb: fix pointer arithmetic (cid #1048983)

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

 modules/video_output/fb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 78c480a..8b90025 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -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);



More information about the vlc-commits mailing list