b6bb513235
* sprintf -> snprintf From: danh@
22 lines
827 B
Plaintext
22 lines
827 B
Plaintext
$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 (;;)
|
|
{
|
|
/* create new file */
|
|
- snprintf (path, sizeof (path), "%s/tmp/%ld_%d.%d.%s%s",
|
|
+ snprintf (path, sizeof (path), "%s/tmp/%d_%d.%d.%s%s",
|
|
mbox->path, time (0), MaildirCount++, getpid (),
|
|
Hostname, suffix);
|
|
|