On Jul 1, 2008, at 12:29, Michael Wieher wrote:

cp = memcached_get(&(data- >mc),req,strlen(req),&size,&flags,&mcr);
       if(mcr==0) {
           memcpy(ans,cp,strlen(cp));


Are you completely sure it's safe to call strlen on whatever cp is? Just use the size.

In general, running stuff like this through valgrind will tell you a lot.

--
Dustin Sallings

Reply via email to