mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
src/driver/framebuffer.cpp: check dimension in int_convertRGB2FB and if it's not valid, spit out a warning
and return NULL.
Origin commit data
------------------
Branch: ni/coolstream
Commit: bc0c048474
Author: [CST] Bas <bas@coolstreamtech.com>
Date: 2015-02-22 (Sun, 22 Feb 2015)
Origin message was:
------------------
src/driver/framebuffer.cpp: check dimension in int_convertRGB2FB and if it's not valid, spit out a warning
and return NULL.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1825,7 +1825,15 @@ void * CFrameBuffer::int_convertRGB2FB(unsigned char *rgbbuff, unsigned long x,
|
|||||||
{
|
{
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
unsigned int *fbbuff;
|
unsigned int *fbbuff;
|
||||||
unsigned long count = x * y;
|
unsigned long count;
|
||||||
|
|
||||||
|
if (!x || !y) {
|
||||||
|
printf("convertRGB2FB%s: Error: invalid dimensions (%luX x %luY)\n",
|
||||||
|
((alpha) ? " (Alpha)" : ""), x, y);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
count = x * y;
|
||||||
|
|
||||||
fbbuff = (unsigned int *) cs_malloc_uncached(count * sizeof(unsigned int));
|
fbbuff = (unsigned int *) cs_malloc_uncached(count * sizeof(unsigned int));
|
||||||
if(fbbuff == NULL) {
|
if(fbbuff == NULL) {
|
||||||
|
Reference in New Issue
Block a user