mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
check FE/CA array size upon init
This commit is contained in:
parent
6bb5bcac05
commit
e9b2e0e718
@ -631,6 +631,9 @@ static int init_ca(struct dddvb *dd, int a, int f, int fd)
|
||||
struct dddvb_ca *ca;
|
||||
char fname[80];
|
||||
|
||||
if (dd->dvbca_num >= DDDVB_MAX_DVB_CA)
|
||||
return -1;
|
||||
|
||||
ca = &dd->dvbca[dd->dvbca_num];
|
||||
ca->dd = dd;
|
||||
ca->anum = a;
|
||||
|
@ -798,6 +798,9 @@ static int dddvb_fe_init(struct dddvb *dd, int a, int f, int fd)
|
||||
int r;
|
||||
uint32_t i, ds;
|
||||
|
||||
if (dd->dvbfe_num >= DDDVB_MAX_DVB_FE)
|
||||
return -1;
|
||||
|
||||
fe = &dd->dvbfe[dd->dvbfe_num];
|
||||
|
||||
r = snprintf(fe->name, sizeof(fe->name), "/dev/dvb/adapter%d/frontend%d", a, f);
|
||||
|
Loading…
Reference in New Issue
Block a user