changeset 8510:ce91f7963495

8183028: Improve CMS header processing Reviewed-by: serb, rhalade, mschoene
author prr
date Thu, 06 Jul 2017 13:34:55 -0700
parents eaa0cf0c998e
children 88d3306d6ee8
files src/share/native/sun/java2d/cmm/lcms/cmstypes.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/java2d/cmm/lcms/cmstypes.c	Wed Jul 05 23:50:20 2017 -0700
+++ b/src/share/native/sun/java2d/cmm/lcms/cmstypes.c	Thu Jul 06 13:34:55 2017 -0700
@@ -1484,6 +1484,7 @@
 
         // Check for overflow
         if (Offset < (SizeOfHeader + 8)) goto Error;
+        if (((Offset + Len) < Len) || ((Offset + Len) > SizeOfTag + 8)) goto Error;
 
         // True begin of the string
         BeginOfThisString = Offset - SizeOfHeader - 8;