projects
/
platform
/
upstream
/
v4l-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7506dfc
)
libdvbv5/dvb-scan: all tables should have an specified size
author
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Fri, 29 Nov 2013 02:12:47 +0000
(
00:12
-0200)
committer
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Fri, 29 Nov 2013 02:12:47 +0000
(
00:12
-0200)
If a table has a zero size, reject it.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/libdvbv5/dvb-scan.c
patch
|
blob
|
history
diff --git
a/lib/libdvbv5/dvb-scan.c
b/lib/libdvbv5/dvb-scan.c
index
639e669
..
e97ddfa
100644
(file)
--- a/
lib/libdvbv5/dvb-scan.c
+++ b/
lib/libdvbv5/dvb-scan.c
@@
-208,8
+208,13
@@
int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd,
if (!tbl) {
if (dvb_table_initializers[tid].size)
tbl = malloc(dvb_table_initializers[tid].size);
- else
- tbl = malloc(MAX_TABLE_SIZE);
+ else {
+ dvb_logerr("dvb_read_section: no table size for table %d",
+ tid);
+ free(buf);
+ dvb_dmx_stop(dmx_fd);
+ return -1;
+ }
if (!tbl) {
dvb_logerr("Out of memory");
free(buf);