Package: patch
Version: 2.5.9-4
Followup-For: Bug #372769
Attached is a patch that appears to fix the bug (by doing some extra
sanity checking). Looks ok so far, but could do with a double-check.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (990, 'stable'), (103, 'testing'), (102, 'unstable'), (99,
'experimental'), (97, 'feisty')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages patch depends on:
ii libc6 2.3.6.ds1-10 GNU C Library: Shared libraries
patch recommends no packages.
-- no debconf information
diff -rN -u old-patch-2.5.9/pch.c new-patch-2.5.9/pch.c
--- old-patch-2.5.9/pch.c 2007-01-24 14:33:13.000000000 +0100
+++ new-patch-2.5.9/pch.c 2007-01-24 14:56:44.000000000 +0100
@@ -617,7 +617,7 @@
}
is_empty = i == NONE || st[i].st_size == 0;
- if ((! is_empty) < p_says_nonexistent[reverse ^ is_empty])
+ if ((i0!=NONE || i!=NONE) && (! is_empty) <
p_says_nonexistent[reverse ^ is_empty])
{
assert (i0 != NONE);
reverse ^=