From e02912fbb92252f664d7bcbe9366cc2261aa64e6 Mon Sep 17 00:00:00 2001 From: henryjen Date: Tue, 24 May 2016 07:49:17 -0700 Subject: [PATCH] 8156478: 3 Buffer overrun defect groups in jexec.c Reviewed-by: ksrini --- src/solaris/bin/jexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/solaris/bin/jexec.c b/src/solaris/bin/jexec.c index a30617de7..13220cb41 100644 --- a/src/solaris/bin/jexec.c +++ b/src/solaris/bin/jexec.c @@ -331,6 +331,7 @@ const char * isJar(const char * path) { off_t end = start + xlen; if (end <= count) { + end -= 4; // make sure there are 4 bytes to read at start while (start < end) { off_t xhid = SH(buf, start); off_t xdlen = SH(buf, start + 2); -- GitLab