mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
Includes a patch from ChromiumOS. Bug: https://bugs.gentoo.org/701848 Signed-off-by: Sam James (sam_c) <sam@cmpct.info> Closes: https://github.com/gentoo/gentoo/pull/14970 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
16 lines
304 B
Diff
16 lines
304 B
Diff
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");
|