mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 18:31:22 +02:00
framebuffer: add sanity check in paintPixel
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