mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
framebuffer: add sanity check in paintPixel
Origin commit data
------------------
Commit: 5abc54f429
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-07-14 (Sat, 14 Jul 2012)
This commit is contained in:
@@ -1279,6 +1279,8 @@ void CFrameBuffer::paintPixel(const int x, const int y, const fb_pixel_t col)
|
|||||||
#ifdef USE_NEVIS_GXA
|
#ifdef USE_NEVIS_GXA
|
||||||
paintHLineRel(x, 1, y, col);
|
paintHLineRel(x, 1, y, col);
|
||||||
#else
|
#else
|
||||||
|
if (x > xRes || y > yRes || x < 0 || y < 0)
|
||||||
|
return;
|
||||||
fb_pixel_t * pos = getFrameBufferPointer();
|
fb_pixel_t * pos = getFrameBufferPointer();
|
||||||
pos += (stride / sizeof(fb_pixel_t)) * y;
|
pos += (stride / sizeof(fb_pixel_t)) * y;
|
||||||
pos += x;
|
pos += x;
|
||||||
|
Reference in New Issue
Block a user