[Dovecot] uint_cmp bug
In reviewing the differences between 1.1.8 and 1.1.9 I saw a probable
bug in the new function uint_cmp() in src/lib-storage/index/maildir/
maildir-sync-index.c:
if (*i1 < *i2)
return -1;
else if (*i1 > *i2)
return -1;
else
return 0;
The second case should return 1 not -1.
On Mon, 2009-01-26 at 11:53 -0600, Mike Abbott wrote:
In reviewing the differences between 1.1.8 and 1.1.9 I saw a probable
bug in the new function uint_cmp() in src/lib-storage/index/maildir/ maildir-sync-index.c: if (*i1 < *i2) return -1; else if (*i1 > *i2) return -1; else return 0; The second case should return 1 not -1.
Oh, thanks! I did try a couple of tests for that code but they worked there. I guess qsort() can go to infinite loop because of this. So another reason to get 1.1.10 out today.
participants (2)
-
Mike Abbott
-
Timo Sirainen