Commit 8e74f998 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dr_0a.c: Fix CID #17253

parent efa50840
......@@ -94,8 +94,9 @@ dvbpsi_descriptor_t * dvbpsi_GenISO639Dr(dvbpsi_iso639_dr_t * p_decoded,
p_decoded->i_code_count = 64;
/* Create the descriptor */
uint8_t i_size = (p_decoded->i_code_count * 4) > UINT8_MAX ? 255 : p_decoded->i_code_count * 4;
dvbpsi_descriptor_t * p_descriptor =
dvbpsi_NewDescriptor(0x0a, p_decoded->i_code_count * 4, NULL);
dvbpsi_NewDescriptor(0x0a, i_size, NULL);
if (!p_descriptor)
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