Commit 5058ea22 authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Paul Saman

dr_50: fix off-by-6

parent f69face9
...@@ -70,7 +70,7 @@ dvbpsi_component_dr_t* dvbpsi_DecodeComponentDr(dvbpsi_descriptor_t * p_descript ...@@ -70,7 +70,7 @@ dvbpsi_component_dr_t* dvbpsi_DecodeComponentDr(dvbpsi_descriptor_t * p_descript
if (p_descriptor->i_length > 6) if (p_descriptor->i_length > 6)
{ {
p_decoded->i_text_length = p_descriptor->i_length - 6; p_decoded->i_text_length = p_descriptor->i_length - 6;
p_decoded->i_text = calloc(p_decoded->i_text_length - 6, sizeof(uint8_t)); p_decoded->i_text = calloc(1, p_decoded->i_text_length);
if (!p_decoded->i_text) if (!p_decoded->i_text)
{ {
free(p_decoded); free(p_decoded);
......
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