doc/share/security/patches/SA-16:25/bspatch.patch
2016-07-25 15:12:34 +00:00

13 lines
286 B
Diff

--- usr.bin/bsdiff/bspatch/bspatch.c.orig
+++ usr.bin/bsdiff/bspatch/bspatch.c
@@ -164,6 +164,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");