NetBSD-Bugs archive

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

bin/42619: patch(1) misfuzzes hunks



>Number:         42619
>Category:       bin
>Synopsis:       patch(1) misfuzzes hunks
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 14 23:50:00 +0000 2010
>Originator:     Antti Kantee
>Release:        5.0
>Organization:
>Environment:
>Description:
> patch < bug.patch 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: puffs_msgif.c
|===================================================================
|RCS file: /cvsroot/src/sys/fs/puffs/puffs_msgif.c,v
|retrieving revision 1.79
|diff -p -u -r1.79 puffs_msgif.c
|--- puffs_msgif.c      7 Jan 2010 23:02:34 -0000       1.79
|+++ puffs_msgif.c      14 Jan 2010 17:54:02 -0000
--------------------------
Patching file puffs_msgif.c using Plan A...
Hunk #1 succeeded at 996 with fuzz 1 (offset 123 lines).
Hunk #2 failed at 1019.
Hunk #3 succeeded at 957 (offset -10 lines).
1 out of 3 hunks failed--saving rejects to puffs_msgif.c.rej
done

The result is in:
http://www.cs.hut.fi/~pooka/NetBSD/patchbug/

Observe that hunk2 is applied in puffs_msgif.c and hunk1 has been "lost".
>How-To-Repeat:
get files from url mentioned above.  Then mv puffs_msgif.c.orig puffs_msgif.c ; 
patch < bug.patch
>Fix:
pester joerg



Home | Main Index | Thread Index | Old Index