r24756 by jghali - Fix potential buffer overflow in ScPaths::getSpecialDir()

scribus-commit scribus-commit at lists.scribus.net
Mon Oct 25 19:56:17 UTC 2021


Author: jghali
Date: Mon Oct 25 19:56:17 2021
New Revision: 24756

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24756
Log:
Fix potential buffer overflow in ScPaths::getSpecialDir()

Modified:
    branches/Version14x/Scribus/scribus/scpaths.cpp

Modified: branches/Version14x/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24756&path=/branches/Version14x/Scribus/scribus/scpaths.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scpaths.cpp	(original)
+++ branches/Version14x/Scribus/scribus/scpaths.cpp	Mon Oct 25 19:56:17 2021
@@ -502,7 +502,7 @@
 {
 	QString qstr;
 #if defined(_WIN32)
-	WCHAR dir[256];
+	WCHAR dir[MAX_PATH];
 	if ( SHGetSpecialFolderPathW(NULL, dir, folder , false) )
 	{
 		qstr = QString::fromUtf16((const unsigned short*) dir);




More information about the scribus-commit mailing list