aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-08-23 15:38:57 +0000
committerMåns Rullgård <mans@mansr.com>2010-08-23 15:38:57 +0000
commite955bf3b42f2e571059593bb116231b4e69d73a9 (patch)
treeca0d5ea86bbb8c6e0f9363f79bf8d3168f9f696e
parent573af7545e2c8f9951a7968a01c0790f02816388 (diff)
downloadffmpeg-e955bf3b42f2e571059593bb116231b4e69d73a9.tar.gz
asfcrypt: fix unaligned read in ff_asfcrypt_dec()
Originally committed as revision 24886 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/asfcrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfcrypt.c b/libavformat/asfcrypt.c
index 55ad82795a..cb3516fc50 100644
--- a/libavformat/asfcrypt.c
+++ b/libavformat/asfcrypt.c
@@ -156,7 +156,7 @@ void ff_asfcrypt_dec(const uint8_t key[20], uint8_t *data, int len) {
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);