bugGNU patch - Bugs: bug #44905, 2.7.5 regression (I think): .. in...

 
 

bug #44905: 2.7.5 regression (I think): .. in command line args no longer works

Submitter:  Andrew Lutomirski <amluto>
Submitted:  Wed 22 Apr 2015 09:45:16 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 09 Aug 2016 10:16:31 PM UTC, comment #2: 

Fixed in git.

Andreas Gruenbacher <agruen>
Group administrator
Wed 22 Apr 2015 09:49:39 PM UTC, comment #1: 

$ patch --output=- -- `/bin/pwd`/../dir/a diff
patching file - (read from /home/luto/ama/gccfun/patch/dir/../dir/a)
b

This suggests that there's another bug here, too.  That should be just as dangerous as ../dir/a.

Andrew Lutomirski <amluto>
Wed 22 Apr 2015 09:45:16 PM UTC, original submission:  

The recent symlink fixes appear to apply incorrectly to command line arguments.  For example:

$ mkdir dir
$ cd dir
$ echo a>a
$ echo b>b
$ diff -u a b >diff
$ patch --output=- -- a diff
patching file - (read from a)
b
$ patch --output=- -- ../dir/a diff
patching file - (read from ../dir/a)
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file -.rej

The patch "../dir/a" should be trusted because it came from the command line, not the patch file.

(NB: I've only compared Fedora's latest version to old versions, but I'm reasonably confident that I'm right.)

Andrew Lutomirski <amluto>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by agruen (Posted a comment)
  • -email is unavailable- added by efferre79
  • -email is unavailable- added by amluto (Submitted the item)
  • -email is unavailable- added by amluto
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-09 agruen StatusNone Fixed
        Open/ClosedOpen Closed
    2015-09-21 efferre79 Carbon-Copy- Added efferre79
    2015-04-22 amluto Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code