FreeBSD's malloc problem ?

Nicolas Rachinsky list at rachinsky.de
Sat Apr 24 11:44:25 PDT 2004


* Anton Alin-Adrian <aanton at reversedhell.net> [2004-04-24 21:27 +0300]:
> 	tmp = (char *) malloc(strlen(s)); // line 68

Hmm, you need strlen(s)+1 bytes to store the string -- don't forget
the trailing null byte.

Nicolas


More information about the freebsd-hackers mailing list