changeset 6400:6928d93146e6 libavformat

asfcrypt: fix unaligned read in ff_asfcrypt_dec()
author mru
date Mon, 23 Aug 2010 15:38:57 +0000
parents dda201b8a6f6
children 4c2f01a5f69f
files asfcrypt.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/asfcrypt.c	Mon Aug 23 11:53:27 2010 +0000
+++ b/asfcrypt.c	Mon Aug 23 15:38:57 2010 +0000
@@ -156,7 +156,7 @@
     av_rc4_crypt(&rc4, (uint8_t *)rc4buff, NULL, sizeof(rc4buff), NULL, 1);
     multiswap_init((uint8_t *)rc4buff, ms_keys);
 
-    packetkey = qwords[num_qwords - 1];
+    packetkey = AV_RN64(&qwords[num_qwords - 1]);
     packetkey ^= rc4buff[7];
     av_des_init(&des, key + 12, 64, 1);
     av_des_crypt(&des, (uint8_t *)&packetkey, (uint8_t *)&packetkey, 1, NULL, 1);