On Jul 1, 2008, at 13:03, Michael Wieher wrote:

(a few spaces would make this easier to read)

   sprintf(qstring,"%s%d%lu",code,cur->file,cur->location);

sprintf is generally not recommended. It doesn't seem terribly hard to get it to exceed your stack buffer here.

It would be valuable at least to check the return value to ensure it is strictly less than the size of your buffer.

        An assert(strlen(qstring) < sizeof(qstring)) would also help with that.

   char * tempbuff = (char*)calloc(sizeof(char),cur->size);

        assert(tempbuff);


You seem to be missing symbols from the valgrind output. Perhaps you should compile the debugging symbols in.

--
Dustin Sallings

Reply via email to