Memcached segfault on increment

Tomash Brechko tomash.brechko at gmail.com
Wed Jun 18 18:20:48 UTC 2008


On Wed, Jun 18, 2008 at 14:18:13 +0200, Janusz Dziemidowicz wrote:
> ==12825== Invalid write of size 1
> ==12825==    at 0x4A1C979: memset (mc_replace_strmem.c:479)
> ==12825==    by 0x40336D: do_add_delta (memcached.c:1535)

Quick glance reveals another possible bug, at line 1529:

        memcpy(ITEM_data(new_it) + res, "\r\n", 3);

There's no room for \0 character, it should be "\r\n", 2.  Though this
shouldn't be part of the reported problem...

-- 
   Tomash Brechko


More information about the memcached mailing list