bug-patch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-patch] segmentation fault when one mistypes the -R option


From: Benno Schulenberg
Subject: [bug-patch] segmentation fault when one mistypes the -R option
Date: Wed, 30 May 2018 21:23:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Hi,

Trying to apply a random (git-style) patch in reverse and typing
_R instead of -R, causes 'patch' to go spinning in circles and in
the end segfault.

For example, with the attached patch, running:

  patch -p1 <foo.patch _R  2>ERRORS

results in:

patching file _R
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED -- saving rejects to file _R.rej
Segmentatiefout

  head ERRORS

patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory
patch: **** Can't reopen file _R : No such file or directory

  wc --lines ERRORS

11156 ERRORS

The patch posted by Lubomir Rintel earlier this month avoids
the problem.

  patch --version | head -1

GNU patch 2.7.6

Benno

Attachment: foo.patch
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]