[OSM-talk] gosmore crashes after a few searches

Martijn van Oosterhout kleptog at gmail.com
Thu Aug 30 10:28:16 BST 2007

Ok, got something: valgrind points at sprintf and gosmore only uses
that in one place. And that function is indeed slightly dodgy. Some

          if (!i) len += strlen (last);
          else len += sprintf (msg + len, "%s\n", last);

That should probably be strlen(last)+1. Earlier it does a len+=11, I'd
make that 12 to be on the safe side.

See if that helps,

Have a nice day,

On 8/30/07, Petter Reinholdtsen <pere at hungry.com> wrote:
> Now the valgrind output is available from
> <URL:http://bugs.debian.org/439732>, and gosmore seem to write past
> allocated memory, and I suspect that mess seriously with the control
> structure used by malloc() and friends.
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/

More information about the talk mailing list