From: Russell Bryant Date: Wed, 14 Mar 2012 00:38:26 +0000 (+0000) Subject: Fix incorrect usage of sizeof() in res_crypto. X-Git-Tag: 10.3.0~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09895ff9534ae454c8d07edb2f57a0ca5f00c7f5;p=thirdparty%2Fasterisk.git Fix incorrect usage of sizeof() in res_crypto. In this case, just remove the memset(). There was a redundant memset that is done correctly just 2 lines later. ........ Merged revisions 359110 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@359114 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_crypto.c b/res/res_crypto.c index 4ae0851d69..7c38e3d28b 100644 --- a/res/res_crypto.c +++ b/res/res_crypto.c @@ -116,7 +116,6 @@ static int pw_cb(char *buf, int size, int rwflag, void *userdata) key->infd = -2; return -1; } - memset(buf, 0, sizeof(buf)); tmp = ast_hide_password(key->infd); memset(buf, 0, size); res = read(key->infd, buf, size);