[Bug 270867] xargs -E is not working properly
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 270867] xargs -E is not working properly"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 15 Apr 2023 16:33:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270867 --- 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, don't use strcmp(3) which checks for a NUL. As we're still building the argument 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()... -- You are receiving this mail because: You are the assignee for the bug.