[dovecot-cvs] dovecot-sieve/src map.c,1.1.1.1,1.2
tss at dovecot.org
tss at dovecot.org
Fri Feb 16 15:09:47 UTC 2007
Update of /var/lib/cvs/dovecot-sieve/src
In directory talvi:/tmp/cvs-serv9289/src
Modified Files:
map.c
Log Message:
Don't crash if the .sievec file is zero bytes.
Index: map.c
===================================================================
RCS file: /var/lib/cvs/dovecot-sieve/src/map.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- map.c 11 Jun 2006 11:03:53 -0000 1.1.1.1
+++ map.c 16 Feb 2007 15:09:45 -0000 1.2
@@ -27,6 +27,12 @@
ssize_t ret;
void *p;
+ if (newlen == 0) {
+ /* the file is a broken zero-byte file */
+ *len = 0;
+ return;
+ }
+
*base = p = i_malloc(newlen);
*len = newlen;
More information about the dovecot-cvs
mailing list