Commit 3fb4b208 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dr_76.c: Fix (CID 17267) out-of-bounds write.

parent 6befa2b6
...@@ -87,7 +87,9 @@ dvbpsi_content_id_dr_t *dvbpsi_DecodeContentIdDr(dvbpsi_descriptor_t *p_descript ...@@ -87,7 +87,9 @@ dvbpsi_content_id_dr_t *dvbpsi_DecodeContentIdDr(dvbpsi_descriptor_t *p_descript
entry->value.path[i] = p_descriptor->p_data[byte + i]; entry->value.path[i] = p_descriptor->p_data[byte + i];
} }
byte += len; byte += len;
entry->value.path[i] = 0; /* Properly terminate the string */
unsigned int last = (i < len) ? i : len - 1U;
entry->value.path[last] = 0;
} }
else if (entry->i_location == CRID_LOCATION_CIT) else if (entry->i_location == CRID_LOCATION_CIT)
{ {
......
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