mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 02:11:04 +02:00
Merge remote-tracking branch 'check/cst-next'
Origin commit data
------------------
Branch: ni/coolstream
Commit: 22dd798325
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-02-25 (Wed, 25 Feb 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1099,10 +1099,25 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
||||
//printf("paintIcon: error while loading icon: %s\n", newname.c_str());
|
||||
return false;
|
||||
}
|
||||
read(lfd, &header, sizeof(struct rawHeader));
|
||||
|
||||
ssize_t s = read(lfd, &header, sizeof(struct rawHeader));
|
||||
if (s < 0) {
|
||||
perror("read");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s < (ssize_t) sizeof(rawHeader)){
|
||||
printf("paintIcon: error while loading icon: %s, header too small\n", newname.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
tmpIcon.width = width = (header.width_hi << 8) | header.width_lo;
|
||||
tmpIcon.height = height = (header.height_hi << 8) | header.height_lo;
|
||||
if (!width || !height) {
|
||||
printf("paintIcon: error while loading icon: %s, wrong dimensions (%dHx%dW)\n", newname.c_str(), height, width);
|
||||
return false;
|
||||
}
|
||||
|
||||
int dsize = width*height*sizeof(fb_pixel_t);
|
||||
|
||||
@@ -1810,7 +1825,15 @@ void * CFrameBuffer::int_convertRGB2FB(unsigned char *rgbbuff, unsigned long x,
|
||||
{
|
||||
unsigned long i;
|
||||
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));
|
||||
if(fbbuff == NULL) {
|
||||
|
Reference in New Issue
Block a user