dh_insert: bad deref in chain for ...
Christian Wuerdig <[email protected]>
| Newsgroups | gmane.network.sn |
|---|---|
| Message-ID | <[email protected]> |
Hi,
sometimes I get this message:
"dh_insert:bad deref in chain for <xxxxxxxxxxxxxxxx> during search"
Result: "store_local:can't insert in db for <yyyyyyyyyyyyyy>"
While I was looking for the reason I found that code snipet in dhash.c:
while (chp != NULL)
{
... code ...
if (chp == NULL)
{
LOG("dh_insert:bad deref in chain for \"<%s>\" during search", dp->messageid);
break;
}
}
len = sizeof (struct chain) + strlen(dp->messageid) + 1 - sizeof (chp->messageid);
But if chp is NULL, this will end the while loop and the next
statement should segfault because of 'sizeof(chp->messageid)', shouldn't it?
I'm wondering why this doesn't break?
so long Chris
--
Um des Reimes willen, lasst uns einen killen.