[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] Crash in mailutils with sieve tests
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-mailutils] Crash in mailutils with sieve tests |
Date: |
Mon, 25 Jul 2005 23:28:24 +0300 |
Sergey Poznyakoff <address@hidden> wrote:
> I guess I know the reason. I'll fix this tonight.
Done. I've installed the following fixes:
2005-07-25 Sergey Poznyakoff <address@hidden>
* mailbox/locker.c (locker_lock): Allow for non-absolute file
names.
Index: mailbox/locker.c
===================================================================
RCS file: /cvsroot/mailutils/mailutils/mailbox/locker.c,v
retrieving revision 1.27
diff -p -u -r1.27 locker.c
--- mailbox/locker.c 17 May 2005 13:13:37 -0000 1.27
+++ mailbox/locker.c 25 Jul 2005 20:12:42 -0000
@@ -425,9 +425,15 @@ locker_lock (locker_t lock)
strcpy (tmp, lock->file);
p = strrchr (tmp, '/');
- /* A '/' must be present, if not we'll coredump, and that's
- correct! */
- *p = 0;
+ if (!p)
+ {
+ free (tmp);
+ tmp = strdup (".");
+ if (!tmp)
+ return ENOMEM;
+ }
+ else
+ *p = 0;
if (access (tmp, W_OK))
{