{
struct Alias *a = NULL, *tmp = NULL;
struct AliasList a_list = TAILQ_HEAD_INITIALIZER(a_list);
- char bestname[HUGE_STRING];
+ char bestname[HUGE_STRING] = { 0 };
if (buf[0] != 0) /* avoid empty string as strstr argument */
{
- memset(bestname, 0, sizeof(bestname));
-
TAILQ_FOREACH(a, &Aliases, entries)
{
if (a->name && strncmp(a->name, buf, strlen(buf)) == 0)
static int fseek_last_message(FILE *f)
{
LOFF_T pos;
- char buffer[BUFSIZ + 9]; /* 7 for "\n\nFrom " */
+ char buffer[BUFSIZ + 9] = { 0 }; /* 7 for "\n\nFrom " */
size_t bytes_read;
- memset(buffer, 0, sizeof(buffer));
fseek(f, 0, SEEK_END);
pos = ftello(f);
static void hmac_md5(const char *password, char *challenge, unsigned char *response)
{
struct Md5Ctx ctx;
- unsigned char ipad[MD5_BLOCK_LEN], opad[MD5_BLOCK_LEN];
+ unsigned char ipad[MD5_BLOCK_LEN] = { 0 };
+ unsigned char opad[MD5_BLOCK_LEN] = { 0 };
unsigned char secret[MD5_BLOCK_LEN + 1];
size_t secret_len;
else
mutt_str_strfcpy((char *) secret, password, sizeof(secret));
- memset(ipad, 0, sizeof(ipad));
- memset(opad, 0, sizeof(opad));
memcpy(ipad, secret, secret_len);
memcpy(opad, secret, secret_len);
if (f)
{
unlink(s);
- char buf[2048];
- memset(buf, 0, sizeof(buf));
+ char buf[2048] = { 0 };
while (sb.st_size > 0)
{
fwrite(buf, 1, MIN(sizeof(buf), sb.st_size), f);