mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
triple: add a sanity check to cVideo::GetScreenImage
Origin commit data
------------------
Branch: master
Commit: e6fefa10c1
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-01-13 (Sun, 13 Jan 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -942,6 +942,12 @@ bool cVideo::GetScreenImage(unsigned char * &video, int &xres, int &yres, bool g
|
||||
}
|
||||
uint16_t w = *(uint16_t *)(map + WIDTH_OFF);
|
||||
uint16_t h = *(uint16_t *)(map + HEIGHT_OFF);
|
||||
if (w > 720 || h > 576) {
|
||||
lt_info("%s: unhandled resolution %dx%d, is the tuner locked?\n", __func__, w, h);
|
||||
munmap(map, VIDEO_SIZE);
|
||||
close(mfd);
|
||||
return false;
|
||||
}
|
||||
uint8_t *luma, *chroma;
|
||||
int needmem = w * h * 5 / 4; /* chroma is 1/4 in size of luma */
|
||||
int lumasize = w * h;
|
||||
|
Reference in New Issue
Block a user