From nobody Tue Apr 04 17:05:08 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 4PrYzT3sN4z43s3y for ; Tue, 4 Apr 2023 17:05:09 +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 4PrYzT1T7dz3wvV for ; Tue, 4 Apr 2023 17:05:09 +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=1680627909; 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; bh=0BW0KkStCJYNWbNXdnjTWIsH4G1orHJpvtArwh8I3Ag=; b=i8rUUKBG3pMbLxhBL6WiWCl7oifJCtBxMBMe4klVq/rHDRf3VAMPh0enWVwVKTayt5e4Qu pN15peVYxxQcRpXhE7shon56oduR4Wj0VTIfPbNRlOk+/Qyh2YMnX0f+ma1NRyiUaN86Nf Ox1W481vxoYZ9/ljok7Of3/JWszoxZ3iBNeepXQnCcdh9D0m2l8oYKuFMP5z+7PeRcT/mK 7rnqNGC2XZGY+kkpkigcIMLKtrgjZ6ybzRXEVjHZTikfXI93/LjXfLnHpjexgxMojFA7Ap z6vJqGaeyKS1yZU59vqDzCN7pM/2geKKmwueofUs82D/iPAAMZuC965gVIgkug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680627909; a=rsa-sha256; cv=none; b=rCbK7sOSGaw+X8lrOWAWm940cDr5p5vKNGhF9lPsosOn8RZA0xAwtywfOQTIRCty9XlR2E cB49BvIstXvnvcTBv5Rpef1sdHDPEFm70vHyL3yNmLAG84BPm3hhlXARcDDW3Y+iO24k1M FQq+dEGLFQMukYcE09XrV5t8LnKCP4P7QMLElxZeE4bXvU3aXiqisCm7ByeXfrDFNqXUmG XuZhY8uWQDV/U+Ezm4pW3glXML3tprsug2f6moKLG7LIQQ2zptLnLidg2pcteXLogdrfzW 4gHZMAZSY/jdbmiJKTxIuhurMqMJ7T7zZSw/162gKX4kU5ECRNKzfh6m1PmevQ== 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 4PrYzT07FRzntG for ; Tue, 4 Apr 2023 17:05:09 +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 334H58ln063588 for ; Tue, 4 Apr 2023 17:05:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 334H58iK063587 for bugs@FreeBSD.org; Tue, 4 Apr 2023 17:05:08 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 270643] Malformed output when comparing files with lines longer than 512 characters Date: Tue, 04 Apr 2023 17:05:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new 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 Some People X-Bugzilla-Who: siegel@barebones.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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=3D270643 Bug ID: 270643 Summary: Malformed output when comparing files with lines longer than 512 characters Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: siegel@barebones.com Created attachment 241299 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D241299&action= =3Dedit Zip archive containing example files and output When comparing files which have lines longer than 512 characters, the output generated by `diff` truncates the long line, *and* fails to add a line break after it. This causes the next diff indicator to be missed. - unzip the attached archive ("VenturaDiffBug.zip"). - open a Terminal window, and cd into the resulting folder. - run this command: `diff --text file2.txt file1.txt` Expected result: =3D> The output should look like: ``` 1d0 < - 617149952 616901632 616308736 615692800=20=20=20= =20=20=20 615050752 614669312 613733120 612807680 612417792= =20=20=20=20=20=20 611426560 611000320 610260480 609772544 609525504= =20=20=20=20=20=20 609511936 609338880... (remainder omitted for brevity) 2a2 > - 617149952 616901632=09 ``` Actual result: =3D> The first "<" diff gets truncated at exactly 512 characters, and then = the second diff is appended immediately thereafter with no intervening line bre= ak, so the output looks like this (see `diffoutput.txt` in the archive): ``` 1d0 < - 617149952 616901632 [...omitted for brevity...] 6044454= 42a2 > - 617149952 616901632=09 ``` Note the "`2a2`" at the end of the first line of context; this should start= on a new line, but doesn't. Consequently, interpreting the diff output presents incorrect results to the user. --=20 You are receiving this mail because: You are the assignee for the bug.=