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

Submitted by:  Andrew Lutomirski <amluto>
Submitted on:  Wed 22 Apr 2015 09:45:16 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Fixed in git.

Andreas Gruenbacher <agruen>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 09 Aug 2016 10:16:31 PM UTCagruenStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 21 Sep 2015 08:00:27 PM UTCefferre79Carbon-Copy-=>Added efferre79
    Wed 22 Apr 2015 09:45:16 PM UTCamlutoCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1