From 025816648912258c4eac2f16506eb7d782f3701f Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Thu, 31 Mar 2011 13:20:48 -0700 Subject: [PATCH] rgw: fix buffer overflow Remove unecessary code that was causing a buffer overflow. Signed-off-by: Colin McCabe --- src/rgw/rgw_common.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index d7dacc22c98bc..a9c14543560ae 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -29,10 +29,6 @@ void calc_hmac_sha1(const char *key, int key_len, const char *msg, int msg_len, char *dest) /* destination should be CEPH_CRYPTO_HMACSHA1_DIGESTSIZE bytes long */ { - char key_buf[CEPH_CRYPTO_HMACSHA1_DIGESTSIZE]; - memset(key_buf, 0, CEPH_CRYPTO_HMACSHA1_DIGESTSIZE); - memcpy(key_buf, key, key_len); - HMACSHA1 hmac((const unsigned char *)key, key_len); hmac.Update((const unsigned char *)msg, msg_len); hmac.Final((unsigned char *)dest); -- 2.39.5