summaryrefslogtreecommitdiffstats
path: root/usr.bin/bsdiff/bspatch/bspatch.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-09-23 13:44:42 -0300
committerRenato Botelho <renato@netgate.com>2016-09-23 13:44:42 -0300
commite2276f438816f5c921df6d320a98e6b90a1e613d (patch)
tree79b8811cc54b543a6b62ef758dccc6d9391d5072 /usr.bin/bsdiff/bspatch/bspatch.c
parent5a5f882809260c3079797ed53b1a007ca40a0924 (diff)
parenteaf14f8188deb08bcb1fa48ab854b3a3ab8bf939 (diff)
downloadFreeBSD-src-e2276f438816f5c921df6d320a98e6b90a1e613d.zip
FreeBSD-src-e2276f438816f5c921df6d320a98e6b90a1e613d.tar.gz
Merge remote-tracking branch 'origin/releng/10.3' into RELENG_2_3_2
Diffstat (limited to 'usr.bin/bsdiff/bspatch/bspatch.c')
-rw-r--r--usr.bin/bsdiff/bspatch/bspatch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/bsdiff/bspatch/bspatch.c b/usr.bin/bsdiff/bspatch/bspatch.c
index d2af3ca..92bc75b 100644
--- a/usr.bin/bsdiff/bspatch/bspatch.c
+++ b/usr.bin/bsdiff/bspatch/bspatch.c
@@ -155,6 +155,10 @@ int main(int argc,char * argv[])
};
/* 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");
OpenPOWER on IntegriCloud