https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270867
Yuri Pankov <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Yuri Pankov <[email protected]> --- Apparently foundeof check is passing the wrong length to strncmp(), we should be using the eofstr's one, not the current argument's: diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 21455e7be26..89f75a4c386 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -349,7 +349,7 @@ arg1: if (insingle || indouble) { } arg2: foundeof = *eofstr != '\0' && - strncmp(argp, eofstr, p - argp) == 0; + strncmp(argp, eofstr, strlen(eofstr)) == 0; /* Do not make empty args unless they are quoted */ if ((argp != p || wasquoted) && !foundeof) { -- You are receiving this mail because: You are the assignee for the bug.
