diff --git a/src/solaris/bin/jexec.c b/src/solaris/bin/jexec.c index a30617de7b9b7cb31c3d438077a79e22b3c8bf86..13220cb41bc1ed9d73e6fe5b63ac7a72fe2f566b 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);