Fix incorrect usage of sizeof() in res_crypto.
authorRussell Bryant <russell@russellbryant.com>
Wed, 14 Mar 2012 00:39:23 +0000 (00:39 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 14 Mar 2012 00:39:23 +0000 (00:39 +0000)
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
........

Merged revisions 359114 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359115 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_crypto.c

index 4ae0851..7c38e3d 100644 (file)
@@ -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);