summaryrefslogtreecommitdiff
path: root/libavformat/asfcrypt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-29 01:41:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-29 04:11:10 +0200
commitd40ff29cacf9b8ffa1061392a0e9b3056c4882ea (patch)
tree3b59f4b9a74e209220f0b0dcb90c466e3e4a9b3d /libavformat/asfcrypt.c
parent99bb88c588ea9a46a06b966b9014394385ebe1c3 (diff)
parent44257ef4267f01dd698c8ab8abf50fd77136a8ce (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: asf: only set index_read if the index contained entries. cabac: add overread protection to BRANCHLESS_GET_CABAC(). cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). h264: add overread protection to get_cabac_bypass_sign_x86(). h264: reindent get_cabac_bypass_sign_x86(). h264: use struct offsets in get_cabac_bypass_sign_x86(). h264: fix overreads in cabac reader. wmall: fix seeking. lagarith: fix buffer overreads. dvdec: drop unnecessary dv_tablegen.h #include build: fix doc generation errors in parallel builds Replace memset(0) by zero initializations. faandct: Remove FAAN_POSTSCALE define and related code. dvenc: print allowed profiles if the video doesn't conform to any of them. avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size. FATE: add a test for vp8 with changing frame size. fate: add kgv1 fate test. oggdec: calculate correct timestamps in Ogg/FLAC Conflicts: libavcodec/4xm.c libavcodec/cook.c libavcodec/dvdata.c libavcodec/dvdsubdec.c libavcodec/lagarith.c libavcodec/lagarithrac.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/asfcrypt.c')
-rw-r--r--libavformat/asfcrypt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/asfcrypt.c b/libavformat/asfcrypt.c
index 750758d822..6a51c0426e 100644
--- a/libavformat/asfcrypt.c
+++ b/libavformat/asfcrypt.c
@@ -140,7 +140,7 @@ void ff_asfcrypt_dec(const uint8_t key[20], uint8_t *data, int len) {
struct AVRC4 rc4;
int num_qwords = len >> 3;
uint8_t *qwords = data;
- uint64_t rc4buff[8];
+ uint64_t rc4buff[8] = { 0 };
uint64_t packetkey;
uint32_t ms_keys[12];
uint64_t ms_state;
@@ -151,7 +151,6 @@ void ff_asfcrypt_dec(const uint8_t key[20], uint8_t *data, int len) {
return;
}
- memset(rc4buff, 0, sizeof(rc4buff));
av_rc4_init(&rc4, key, 12 * 8, 1);
av_rc4_crypt(&rc4, (uint8_t *)rc4buff, NULL, sizeof(rc4buff), NULL, 1);
multiswap_init((uint8_t *)rc4buff, ms_keys);