From a92be9b856bd11b081041c43c25d442028fe9a63 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 6 Jun 2011 14:13:02 +0200 Subject: Replace memset(0) by zero initializations. Also remove one pointless zero initialization in rangecoder.c. --- libavformat/asfcrypt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavformat/asfcrypt.c') diff --git a/libavformat/asfcrypt.c b/libavformat/asfcrypt.c index aea3d4f345..6c48a1967a 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); -- cgit v1.2.3