Commit 472ee998 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dr_45.c: Fix CID #17254

parent 8e74f998
...@@ -110,8 +110,10 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(dvbpsi_vbi_dr_t * p_decoded, ...@@ -110,8 +110,10 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(dvbpsi_vbi_dr_t * p_decoded,
p_decoded->i_services_number = DVBPSI_VBI_DR_MAX; p_decoded->i_services_number = DVBPSI_VBI_DR_MAX;
/* Create the descriptor */ /* Create the descriptor */
uint8_t i_size = (p_decoded->i_services_number * 5) > UINT8_MAX ?
255 : (p_decoded->i_services_number * 5); /* FIXME: */
dvbpsi_descriptor_t * p_descriptor = dvbpsi_descriptor_t * p_descriptor =
dvbpsi_NewDescriptor(0x45, p_decoded->i_services_number * 5 , NULL); dvbpsi_NewDescriptor(0x45, i_size, NULL);
if (!p_descriptor) if (!p_descriptor)
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment