changeset 47617:c08d54553a36

8183028: Improve CMS header processing Reviewed-by: serb, rhalade, mschoene
author prr
date Thu, 06 Jul 2017 09:43:27 -0700
parents 6993f9f1ff83
children a2bf68a0365f
files src/java.desktop/share/native/liblcms/cmstypes.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/native/liblcms/cmstypes.c	Thu Jul 06 09:20:21 2017 +0800
+++ b/src/java.desktop/share/native/liblcms/cmstypes.c	Thu Jul 06 09:43:27 2017 -0700
@@ -1489,6 +1489,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;