bug-coreutils
[Top][All Lists]
Advanced

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

Re: updated file for coreutils-5.tar.gz/coreutils-5.0/lib/strstr.c


From: Paul Jarc
Subject: Re: updated file for coreutils-5.tar.gz/coreutils-5.0/lib/strstr.c
Date: Fri, 20 Feb 2004 09:59:20 -0500
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

Digital <address@hidden> wrote:
> As a side comment, There is a BUG with strstr.c
> If haystack gets truncated or there is no trailing '\0', then strstr
> will keep looking past the expected string end into unknown space.

That makes it a dangerous interface, but not a bug.  If the caller
fails to ensure tht the string is properly terminated, then *it* has a
bug.  Pretty much every string function in the C standard works this
way.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]