char tempfile[_POSIX_PATH_MAX];
char buf[HUGE_STRING];
FILE *tfp;
+ int tempfd;
short sgn = 0;
short enc = 0;
if (tagged_only && !b->tagged)
return 0;
- mutt_mktemp (tempfile);
- if (mutt_decode_save_attachment (fp, b, tempfile, 0, 0) != 0) {
+ tempfd = m_tempfd(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL);
+ if (mutt_decode_save_attachment (fp, b, tempfd, 0) != 0) {
unlink (tempfile);
return 0;
}
- if ((tfp = fopen (tempfile, "r")) == NULL) {
- unlink (tempfile);
+ if (!(tfp = fopen(tempfile, "r"))) {
+ unlink(tempfile);
return 0;
}
while (fgets (buf, sizeof (buf) - 1, pgpout) != NULL) {
len = m_strlen(buf);
if (len > 1 && buf[len - 2] == '\r')
- strcpy (buf + len - 2, "\n"); /* __STRCPY_CHECKED__ */
+ m_strcpy(buf + len - 2, len - 2, "\n");
fputs (buf, fpout);
}
last = &((*last)->next);
}
- if (fqdn)
- rfc822_qualify (tmp, fqdn);
+ rfc822_qualify (tmp, fqdn);
address_list_uniq(tmp);
/* check for e-mail address */
if ((t = strchr (keyID, '@')) &&
(addr = rfc822_parse_adrlist (NULL, keyID))) {
- if (fqdn)
- rfc822_qualify (addr, fqdn);
+ rfc822_qualify (addr, fqdn);
q = addr;
}
else
bypass_selection:
keylist_size += m_strlen(keyID) + 4;
p_realloc(&keylist, keylist_size);
- sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "", /* __SPRINTF_CHECKED__ */
+ sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "",
keyID);
keylist_used = m_strlen(keylist);
int pgp_send_menu (HEADER * msg, int *redraw)
{
pgp_key_t p;
- char input_signas[SHORT_STRING];
+ char input_signas[STRING];
char prompt[LONG_STRING];
crypt_pgp_void_passphrase (); /* probably need a different passphrase */
}
-#if 0
- else {
- msg->security &= ~SIGN;
- }
-#endif
*redraw = REDRAW_FULL;
break;