b6bb513235
* sprintf -> snprintf From: danh@
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
$OpenBSD: patch-src_imap_c,v 1.2 2004/05/11 13:54:56 naddy Exp $
|
|
--- src/imap.c.orig 2003-12-07 10:36:38.000000000 -0500
|
|
+++ src/imap.c 2004-05-11 09:15:15.000000000 -0400
|
|
@@ -666,7 +666,7 @@ imap_connect (config_t * cfg)
|
|
}
|
|
close (a[0]);
|
|
close (a[1]);
|
|
- execl ("/bin/sh", "sh", "-c", cfg->tunnel, 0);
|
|
+ execl ("/bin/sh", "sh", "-c", cfg->tunnel, (void *)NULL);
|
|
_exit (127);
|
|
}
|
|
|
|
@@ -794,7 +794,7 @@ imap_connect (config_t * cfg)
|
|
if (!global.pass)
|
|
{
|
|
char prompt[80];
|
|
- sprintf(prompt, "Password (mailbox %s@%s/%s): ",
|
|
+ snprintf(prompt, sizeof prompt, "Password (mailbox %s@%s/%s): ",
|
|
cfg->user, cfg->host, cfg->box);
|
|
global.pass = getpass (prompt);
|
|
if (!global.pass)
|
|
@@ -1223,7 +1223,7 @@ imap_append_message (imap_t * imap, int
|
|
goto bail;
|
|
mktid:
|
|
gettimeofday (&tv, 0);
|
|
- tuidl = sprintf (tuid, "X-TUID: %08lx%05lx%04x\r\n",
|
|
+ tuidl = snprintf (tuid, sizeof tuid, "X-TUID: %08lx%05lx%04x\r\n",
|
|
tv.tv_sec, tv.tv_usec, pid);
|
|
extra += tuidl;
|
|
}
|