[libdvbpsi-devel] Fix improper local variable access in dr_7c
Daniel Kamil Kozar
git at videolan.org
Thu Mar 5 11:22:32 CET 2015
libdvbpsi | branch: master | Daniel Kamil Kozar <dkk089 at gmail.com> | Wed Mar 4 23:18:41 2015 +0100| [b6b5add2ad20cd67a383194c63e890bc39705c54] | committer: Jean-Paul Saman
Fix improper local variable access in dr_7c
The address of a local variable instead of its actual value was passed
to memcpy. As a result, the actual memory referenced by the
p_additional_info pointer was never written to when decoding the
descriptor. Analogous issue occurred when generating.
Signed-off-by: Jean-Paul Saman <jpsaman at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=b6b5add2ad20cd67a383194c63e890bc39705c54
---
src/descriptors/dr_7c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/descriptors/dr_7c.c b/src/descriptors/dr_7c.c
index f51acb4..41d1d8a 100644
--- a/src/descriptors/dr_7c.c
+++ b/src/descriptors/dr_7c.c
@@ -257,7 +257,7 @@ dvbpsi_aac_dr_t *dvbpsi_DecodeAACDr(dvbpsi_descriptor_t *p_descriptor)
uint8_t i_data = p_decoded->b_type ? 3 : 2;
uint8_t *p = &p_descriptor->p_data[i_data];
- memcpy(&p_decoded->p_additional_info, p, i_info_length);
+ memcpy(p_decoded->p_additional_info, p, i_info_length);
}
p_descriptor->p_decoded = (void*)p_decoded;
@@ -292,7 +292,7 @@ dvbpsi_descriptor_t *dvbpsi_GenAACDr(dvbpsi_aac_dr_t *p_decoded, bool b_duplicat
if (p_descriptor->i_length > 1)
{
uint8_t *p = &p_descriptor->p_data[p_decoded->b_type ? 3 : 2];
- memcpy(&p, p_decoded->p_additional_info, p_decoded->i_additional_info_length);
+ memcpy(p, p_decoded->p_additional_info, p_decoded->i_additional_info_length);
}
if (b_duplicate)
More information about the libdvbpsi-devel
mailing list