# HG changeset patch # User henryjen # Date 1463720375 25200 # Node ID 43ef784e3a966cb820306cd283d0e99eb1717088 # Parent 9e77c5b81def6aca7084179e0b39ca8ce94f08b5 8156478: 3 Buffer overrun defect groups in jexec.c Reviewed-by: ksrini diff -r 9e77c5b81def -r 43ef784e3a96 jdk/src/java.base/unix/native/launcher/jexec.c --- a/jdk/src/java.base/unix/native/launcher/jexec.c Fri May 20 13:48:58 2016 +0900 +++ b/jdk/src/java.base/unix/native/launcher/jexec.c Thu May 19 21:59:35 2016 -0700 @@ -331,6 +331,7 @@ 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);