[FFmpeg-cvslog] r24886 - trunk/libavformat/asfcrypt.c

mru subversion
Mon Aug 23 17:38:57 CEST 2010


Author: mru
Date: Mon Aug 23 17:38:57 2010
New Revision: 24886

Log:
asfcrypt: fix unaligned read in ff_asfcrypt_dec()

Modified:
   trunk/libavformat/asfcrypt.c

Modified: trunk/libavformat/asfcrypt.c
==============================================================================
--- trunk/libavformat/asfcrypt.c	Mon Aug 23 17:31:50 2010	(r24885)
+++ trunk/libavformat/asfcrypt.c	Mon Aug 23 17:38:57 2010	(r24886)
@@ -156,7 +156,7 @@ void ff_asfcrypt_dec(const uint8_t key[2
     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);



More information about the ffmpeg-cvslog mailing list