diff options
| author | christos <christos@NetBSD.org> | 2014-11-27 15:07:23 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2014-11-27 15:07:23 +0000 |
| commit | 89f68c2188a95ba27b94e240e1a67a3829dac845 (patch) | |
| tree | 60019d32c11618b8a334f2332c507c494882f359 /usr.bin/patch | |
| parent | d7e9d4d6b10db464e110418c7d8ea0086cc742c7 (diff) | |
PR/49422: Ryo ONODERA: patch(1) cannot handle context diffs
Diffstat (limited to 'usr.bin/patch')
| -rw-r--r-- | usr.bin/patch/pch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c index e91c3f5e1bd..1ef322fb7d9 100644 --- a/usr.bin/patch/pch.c +++ b/usr.bin/patch/pch.c @@ -1,7 +1,7 @@ /* * $OpenBSD: pch.c,v 1.37 2007/09/02 15:19:33 deraadt Exp $ * $DragonFly: src/usr.bin/patch/pch.c,v 1.6 2008/08/10 23:35:40 joerg Exp $ - * $NetBSD: pch.c,v 1.26 2014/11/26 00:31:32 christos Exp $ + * $NetBSD: pch.c,v 1.27 2014/11/27 15:07:23 christos Exp $ */ /* @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pch.c,v 1.26 2014/11/26 00:31:32 christos Exp $"); +__RCSID("$NetBSD: pch.c,v 1.27 2014/11/27 15:07:23 christos Exp $"); #include <sys/types.h> #include <sys/stat.h> @@ -619,8 +619,8 @@ another_hunk(void) p_ptrn_lines = 0; p_first = 1; } - if (p_first <= LINENUM_MAX - p_ptrn_lines || - p_ptrn_lines <= LINENUM_MAX - 6) + if (p_first >= LINENUM_MAX - p_ptrn_lines || + p_ptrn_lines >= LINENUM_MAX - 6) malformed(); /* we need this much at least */ |
