changeset 16502:078eda57a82b

8156478: 3 Buffer overrun defect groups in jexec.c Reviewed-by: ksrini
author henryjen
date Thu, 19 May 2016 21:59:35 -0700
parents 1a4e73ae20ce
children 871cb8793270
files src/java.base/unix/native/launcher/jexec.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/unix/native/launcher/jexec.c	Fri May 20 13:48:58 2016 +0900
+++ b/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);