aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/bsdiff-CVE-2014-9862.patch
blob: 7aab818090d8630eca1af3c77e79e4d8c467b6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/bspatch.c b/bspatch.c
index 8d95633..ab77722 100644
--- a/bspatch.c
+++ b/bspatch.c

@@ -187,6 +187,10 @@
 		};
 
 		/* Sanity-check */
+		if ((ctrl[0] < 0) || (ctrl[1] < 0))
+			errx(1,"Corrupt patch\n");
+
+		/* Sanity-check */
 		if(newpos+ctrl[0]>newsize)
 			errx(1,"Corrupt patch\n");