mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +02:00
cc_draw: ensure unsigned values
avoids possible signed integer overflow runtime errors
Origin commit data
------------------
Commit: 9874a589c7
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-12-02 (Thu, 02 Dec 2021)
This commit is contained in:
@@ -908,12 +908,12 @@ int CCDraw::getYPos() const
|
|||||||
|
|
||||||
int CCDraw::getHeight() const
|
int CCDraw::getHeight() const
|
||||||
{
|
{
|
||||||
return height;
|
return std::max(0, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CCDraw::getWidth() const
|
int CCDraw::getWidth() const
|
||||||
{
|
{
|
||||||
return width;
|
return std::max(0, width);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCDraw::setDimensionsAll(const int& xpos, const int& ypos, const int& w, const int& h)
|
void CCDraw::setDimensionsAll(const int& xpos, const int& ypos, const int& w, const int& h)
|
||||||
|
Reference in New Issue
Block a user