Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Apr 2023 16:33:02 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 270867] xargs -E is not working properly
Message-ID:  <bug-270867-227-PEJEJ7ylRo@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-270867-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-270867-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270867

--- Comment #3 from Yuri Pankov <yuripv@FreeBSD.org> ---
(In reply to Yuri Pankov from comment #2)
And there's a commit that changed strcmp() into strncmp():

commit 4aeb63826e0f9ce817b16abdb1501490307d857c
Author: Juli Mallett <jmallett@FreeBSD.org>
Date:   Sat Dec 31 09:06:45 2005 +0000

    Check the entire length of the current argument for the EOF string with=
 -E,
    but don't expect a proper ASCII string to exist right here right now, d=
on't
    use strcmp(3) which checks for a NUL.  As we're still building the argu=
ment
    up, the next character might be garbage.  It would probably be just as =
safe
to
    temporarily write a NUL there, but if we've reached the end of argument
memory
    that might not be the best idea, I think.  It's unclear.

    Doing it this way seems to meet the most with the original intent.

    PR:             85696
    Prodded by:     stefanf

Checking if what's described in bug 85696 is still a problem with strcmp().=
..

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-270867-227-PEJEJ7ylRo>