Hi, I'm getting a heap corruption error (write after end of heap buffer) using librsync on Windows:
Debug Error ! Program :- Heap Corruption detected : after normal block ...CRT detected that the application wrote memory after end of heap buffer.
It happens in hashtable.c at
free(t->kbloom);
It seems like the allocation of kbloom is wrong:
if (!(t->kbloom = calloc(size2 / 8, sizeof(unsigned char)))) {
IIUC kbloom is a bit set, so it should round up to the next number of bytes:
if (!(t->kbloom = calloc((size2 + 7) / 8, sizeof(unsigned char)))) {
Does this make sense?
Thanks,
- Lutz