mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
cc_draw: avoid possible runtime error with signed integer overflow
Origin commit data
------------------
Branch: ni/coolstream
Commit: f2e4e8b9d7
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-11-13 (Sat, 13 Nov 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -121,11 +121,13 @@ bool CCDraw::applyDimChanges()
|
||||
{
|
||||
bool ret = false;
|
||||
if (height != height_old){
|
||||
height = std::max(0, height);
|
||||
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], dim changes height %d != height_old %d...\033[0m\n", __func__, __LINE__, height, height_old);
|
||||
height_old = height;
|
||||
ret = true;
|
||||
}
|
||||
if (width != width_old){
|
||||
width = std::max(0, width);
|
||||
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], dim changes width %d != width_old %d...\033[0m\n", __func__, __LINE__, width, width_old);
|
||||
width_old = width;
|
||||
ret = true;
|
||||
|
Reference in New Issue
Block a user