mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-13 08:23:39 +02:00
fix possible segfault and negative height
Origin commit data
------------------
Branch: ni/coolstream
Commit: b8849d53b5
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-10-31 (Mon, 31 Oct 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -62,6 +62,9 @@ uint8_t CColorGradient::limitChar(int c)
|
||||
|
||||
fb_pixel_t* CColorGradient::gradientColorToTransparent(fb_pixel_t col, fb_pixel_t *gradientBuf, int bSize, int /*mode*/, int /*intensity*/)
|
||||
{
|
||||
if (bSize < 1)
|
||||
return gradientBuf;
|
||||
|
||||
if (gradientBuf == NULL) {
|
||||
gradientBuf = (fb_pixel_t*) malloc(bSize * sizeof(fb_pixel_t));
|
||||
if (gradientBuf == NULL) {
|
||||
@@ -94,6 +97,8 @@ fb_pixel_t* CColorGradient::gradientColorToTransparent(fb_pixel_t col, fb_pixel_
|
||||
|
||||
fb_pixel_t* CColorGradient::gradientOneColor(fb_pixel_t col, fb_pixel_t *gradientBuf, int bSize, int mode, int intensity, uint8_t v_min, uint8_t v_max, uint8_t s)
|
||||
{
|
||||
if (bSize < 1)
|
||||
return gradientBuf;
|
||||
|
||||
if (gradientBuf == NULL) {
|
||||
gradientBuf = (fb_pixel_t*) malloc(bSize * sizeof(fb_pixel_t));
|
||||
|
Reference in New Issue
Block a user