GNU bug report logs - #35209
Bug in zdiff argument of an option separated by a space is not handled correctly

Previous Next

Package: gzip;

Reported by: Bram Mertens <mertensb.mazda <at> gmail.com>

Date: Tue, 9 Apr 2019 14:24:02 UTC

Severity: normal

Merged with 54290, 54291, 54298

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35209 in the body.
You can then email your comments to 35209 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#35209; Package gzip. (Tue, 09 Apr 2019 14:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bram Mertens <mertensb.mazda <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Tue, 09 Apr 2019 14:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bram Mertens <mertensb.mazda <at> gmail.com>
To: bug-gzip <at> gnu.org
Subject: Bug in zdiff argument of an option separated by a space is not
 handled correctly
Date: Tue, 9 Apr 2019 16:11:14 +0200
Hi,

The zdiff script does not handle options with arguments separated by a
space correctly.

The following if a valid diff command: "diff -y -W 200 /tmp/b1 /tmp/b2".
But when passed to zdiff the space between "-W" and 200 causes the
COLUMNS argument to be interpreted as a file:
zdiff -y -W 200 /tmp/b1 /tmp/b2
/bin/zdiff: 72: /bin/zdiff: cannot open 200: No such file

The error is caused by the following line in the loop that processes
the arguments:
-?*) cmp="$cmp '$1'";; (line 63 in version  1.6)

There should be an additional check to catch options with arguments. I
couldn't come up with a working solution quickly so I am currently
using a workaround.
If I remove the space between the option "-W" and it's COLUMNS
argument the script works as expected.

With this workaround the zdiff utility is great solution for the
problem I'm working on, thanks!

Thanks in advance

Bram Mertens




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 29 Mar 2022 23:55:02 GMT) Full text and rfc822 format available.

Notification sent to Bram Mertens <mertensb.mazda <at> gmail.com>:
bug acknowledged by developer. (Tue, 29 Mar 2022 23:55:02 GMT) Full text and rfc822 format available.

Message #10 received at 35209-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bram Mertens <mertensb.mazda <at> gmail.com>
Cc: 35209-done <at> debbugs.gnu.org
Subject: Re: bug#35209: Bug in zdiff argument of an option separated by a
 space is not handled correctly
Date: Tue, 29 Mar 2022 16:53:58 -0700
On 4/9/19 07:11, Bram Mertens wrote:

> The zdiff script does not handle options with arguments separated by a
> space correctly.

Thanks for reporting that. Lv Ying eventually followed up here:

https://bugs.gnu.org/54291

and as mentioned there, a patch has been installed and should be in the 
next gzip release.




Merged 35209 54290 54291 54298. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 30 Mar 2022 00:08:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Apr 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 357 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.