From 5c682c369cc1a2ea096065b253a7557be5845097 Mon Sep 17 00:00:00 2001 From: Hubert Figuière Date: Thu, 1 Feb 2018 21:02:45 -0500 Subject: 2.4.x: Bug 102483 - Fix an infinite loop in QuickTime parser. --- XMPFiles/source/FormatSupport/QuickTime_Support.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XMPFiles/source/FormatSupport/QuickTime_Support.cpp b/XMPFiles/source/FormatSupport/QuickTime_Support.cpp index 8e2d45a..c735693 100644 --- a/XMPFiles/source/FormatSupport/QuickTime_Support.cpp +++ b/XMPFiles/source/FormatSupport/QuickTime_Support.cpp @@ -920,7 +920,8 @@ bool TradQT_Manager::ParseCachedBoxes ( const MOOV_Manager & moovMgr ) miniLen = 4 + GetUns16BE ( boxPtr ); // ! Include header in local miniLen. macLang = GetUns16BE ( boxPtr+2); - if ( (miniLen <= 4) || (miniLen > (boxEnd - boxPtr)) ) continue; // Ignore bad or empty values. + if ( (miniLen <= 4) || (miniLen > (boxEnd - boxPtr)) ) + break; // Ignore bad or empty values. XMP_StringPtr valuePtr = (char*)(boxPtr+4); size_t valueLen = miniLen - 4; -- cgit v1.2.3