* fix build after type changes in ndbm.h
* sprintf -> snprintf From: danh@
This commit is contained in:
parent
53207f52a8
commit
b6bb513235
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_imap_c,v 1.1 2004/04/20 19:11:34 sturm Exp $
|
||||
$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-04-20 00:43:35.000000000 -0400
|
||||
+++ src/imap.c 2004-05-11 09:15:15.000000000 -0400
|
||||
@@ -666,7 +666,7 @@ imap_connect (config_t * cfg)
|
||||
}
|
||||
close (a[0]);
|
||||
@ -10,3 +10,21 @@ $OpenBSD: patch-src_imap_c,v 1.1 2004/04/20 19:11:34 sturm Exp $
|
||||
_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;
|
||||
}
|
||||
|
21
mail/isync/patches/patch-src_maildir_c
Normal file
21
mail/isync/patches/patch-src_maildir_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-src_maildir_c,v 1.1 2004/05/11 13:54:56 naddy Exp $
|
||||
--- src/maildir.c.orig 2004-05-08 17:51:31.000000000 +0200
|
||||
+++ src/maildir.c 2004-05-08 17:52:07.000000000 +0200
|
||||
@@ -239,7 +239,7 @@ maildir_open (const char *path, int flag
|
||||
*/
|
||||
key.dptr = p->file;
|
||||
s = strchr (key.dptr, ':');
|
||||
- key.dsize = s ? (size_t) (s - key.dptr) : strlen (key.dptr);
|
||||
+ key.dsize = s ? (size_t) (s - (char *)key.dptr) : strlen (key.dptr);
|
||||
key = dbm_fetch (m->db, key);
|
||||
if (key.dptr)
|
||||
{
|
||||
@@ -294,7 +294,7 @@ maildir_expunge (mailbox_t * mbox, int d
|
||||
/* remove the message from the UID map */
|
||||
key.dptr = tmp->file;
|
||||
s = strchr (key.dptr, ':');
|
||||
- key.dsize = s ? (size_t) (s - key.dptr) : strlen (key.dptr);
|
||||
+ key.dsize = s ? (size_t) (s - (char *)key.dptr) : strlen (key.dptr);
|
||||
dbm_delete (mbox->db, key);
|
||||
*cur = (*cur)->next;
|
||||
free (tmp->file);
|
@ -1,6 +1,15 @@
|
||||
$OpenBSD: patch-src_sync_c,v 1.1 2004/04/20 19:11:34 sturm Exp $
|
||||
--- src/sync.c.orig 2003-05-06 20:06:37.000000000 -0400
|
||||
+++ src/sync.c 2004-04-20 00:45:43.000000000 -0400
|
||||
$OpenBSD: patch-src_sync_c,v 1.2 2004/05/11 13:54:56 naddy Exp $
|
||||
--- src/sync.c.orig 2003-05-07 02:06:37.000000000 +0200
|
||||
+++ src/sync.c 2004-05-08 17:26:28.000000000 +0200
|
||||
@@ -53,7 +53,7 @@ set_uid (DBM * db, const char *f, unsign
|
||||
|
||||
key.dptr = (void *) f;
|
||||
s = strchr (f, ':');
|
||||
- key.dsize = s ? (size_t) (s - key.dptr) : strlen (f);
|
||||
+ key.dsize = s ? (size_t) (s - (char *)key.dptr) : strlen (f);
|
||||
val.dptr = (void *) &uid;
|
||||
val.dsize = sizeof (uid);
|
||||
dbm_store (db, key, val, DBM_REPLACE);
|
||||
@@ -325,7 +325,7 @@ sync_mailbox (mailbox_t * mbox, imap_t *
|
||||
for (;;)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user