From nobody Sat Apr 15 16:17:13 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PzJP73l6fz45bNJ for ; Sat, 15 Apr 2023 16:17:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PzJP53t5xz4LNv for ; Sat, 15 Apr 2023 16:17:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681575433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gAFo8cel0mDBlQNr8l7KWXB9vLIYwo2qRxMLBNTXKzI=; b=OfeLTu2TnHetS1vaEWxYwMRxQUKy3/Tv4YS3HC9KymJDJfBsbCS5bhRjvibWm00R0vqXHj IolKHP45ocU4w7DIUVAic/MLWaThWUMMRG6Y8Amc6tQ0Yw4/fVtVPNuBHg7YJ0ZvzpEIud IPp0fOfwAVBpep6//RSJ0X0HwfIHVWo+/9YzxWt+09owMeI9D1aJTq3/FMGmrqTtrajsFz CwcUsFzJeCHLdEpSOn8djd0/1Rwci2bBRE7AjPgYlHYjAlDraTH8LQl/dkzrAt6vLvYvxZ Ufd6kO5nqh7CY5g8576LRKmpAvR8v1GMveJ+KngitHuNaLroAbGL5XfQCzJFXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681575433; a=rsa-sha256; cv=none; b=P+NHDFKdp9n06KuwP6COHCXDpBZ0E01NBPcp/mS7OBX46iNE6GHzGg4DXirJMQlDq/J40m 4g9m0dZf/bxpGG2qa/iwMWiUA7zKqc62vC6hTnL3RvseErmUVWpHsB+0KY9Eqksprj7i5N B3MT/vamtM6OtvKmUJxs/cDBOSkuAKooObzNKMD1oxXu2jnU/UhnTBu9/+7bjYTTIPG3Pr P2AOjggy61WeD4ohm9mD9pqR9gA/8ZETuE1gSXpMWlvgiOYIJfh4/vM1oQlTXvFa+K086b rwN681J346CtSzxaSsaG5epAEteUwtlrgYFN2QXeodRoQyTdTvVFp4Vq3//3oA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzJP52zf6z1C4s for ; Sat, 15 Apr 2023 16:17:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 33FGHD9J091698 for ; Sat, 15 Apr 2023 16:17:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33FGHD9c091697 for bugs@FreeBSD.org; Sat, 15 Apr 2023 16:17:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 270867] xargs -E is not working properly Date: Sat, 15 Apr 2023 16:17:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: yuripv@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270867 Yuri Pankov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yuripv@FreeBSD.org --- Comment #1 from Yuri Pankov --- Apparently foundeof check is passing the wrong length to strncmp(), we shou= ld 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 =3D *eofstr !=3D '\0' && - strncmp(argp, eofstr, p - argp) =3D=3D 0; + strncmp(argp, eofstr, strlen(eofstr)) =3D=3D 0; /* Do not make empty args unless they are quoted */ if ((argp !=3D p || wasquoted) && !foundeof) { --=20 You are receiving this mail because: You are the assignee for the bug.=