mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix memory leak in mutt_sasl_cb_pass.

SASL doesn't free the sasl_secret_t, so this was leaking. Instead,
keep our own pointer to it, and safe_realloc() each time.

sasl_secret_t doesn't need the data field null terminated, so memcpy
the password over.

+6 -3
+6 -3
mutt_sasl.c
··· 84 84 85 85 static sasl_callback_t mutt_sasl_callbacks[5]; 86 86 87 + static sasl_secret_t *secret_ptr = NULL; 88 + 87 89 static int mutt_sasl_start (void); 88 90 89 91 /* callbacks */ ··· 445 447 446 448 len = strlen (account->pass); 447 449 448 - *psecret = (sasl_secret_t*) safe_malloc (sizeof (sasl_secret_t) + len); 449 - (*psecret)->len = len; 450 - strcpy ((char*)(*psecret)->data, account->pass); /* __STRCPY_CHECKED__ */ 450 + safe_realloc (&secret_ptr, sizeof (sasl_secret_t) + len); 451 + memcpy ((char *) secret_ptr->data, account->pass, (size_t) len); 452 + secret_ptr->len = len; 453 + *psecret = secret_ptr; 451 454 452 455 return SASL_OK; 453 456 }