Commit 2e5781e4 authored by Jean-Paul Saman's avatar Jean-Paul Saman

descriptors/dr_50.c: Dereference null pointer (CID 17264)

The bug occurs due to a missing check for allocation failure of p_decoded->i_text.
Instead p_decoded is checked again.
parent 4b8f19f7
......@@ -71,7 +71,7 @@ dvbpsi_component_dr_t* dvbpsi_DecodeComponentDr(dvbpsi_descriptor_t * p_descript
{
p_decoded->i_text_length = p_descriptor->i_length - 6;
p_decoded->i_text = calloc(p_decoded->i_text_length - 6, sizeof(uint8_t));
if (!p_decoded)
if (!p_decoded->i_text)
{
free(p_decoded);
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