[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libc6 bug or stupid programmer

On Thu, 3 Jul 1997, Joey Hess wrote:

> The following segfaults under libc6, works fine under libc5:
> main() {
>   strtok("test","z");
> }
> Is this a bug in strtok or is that really an invalid way to call strtok?

strtok() modifies the string pointed to by the first argument,
so it's illegal to pass it a pointer to a constant.

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: