[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?

Yes, "test" may be a constant string (in the code segment or read only
data segment). strtok requires that the string be non const. So what might
be happening is that it is attempting to write to the string and faulting.

Doubt that is your prob, but still ;>

Jason


--
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: