diff options
author | Matthew Hoops | 2014-06-01 17:01:57 -0400 |
---|---|---|
committer | Matthew Hoops | 2014-06-01 17:02:18 -0400 |
commit | 7af36e97243ed1e94f8f7b75618aad979165e68c (patch) | |
tree | f3d67b284bd0c08b090cac17528c1353dae0d870 /backends/platform/sdl/macosx | |
parent | 00f23b26c520d965c28de8915bfe9d3a7d4ec870 (diff) | |
download | scummvm-rg350-7af36e97243ed1e94f8f7b75618aad979165e68c.tar.gz scummvm-rg350-7af36e97243ed1e94f8f7b75618aad979165e68c.tar.bz2 scummvm-rg350-7af36e97243ed1e94f8f7b75618aad979165e68c.zip |
BACKENDS: Fix invalid buffer size in CFStringGetCString call
Diffstat (limited to 'backends/platform/sdl/macosx')
-rw-r--r-- | backends/platform/sdl/macosx/macosx.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index 924e33b6e3..c48076c42f 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -145,7 +145,7 @@ Common::String OSystem_MacOSX::getSystemLanguage() const { for (CFIndex i = 0 ; i < localizationsSize ; ++i) { CFStringRef language = (CFStringRef)CFArrayGetValueAtIndex(preferredLocalizations, i); char buffer[10]; - CFStringGetCString(language, buffer, 50, kCFStringEncodingASCII); + CFStringGetCString(language, buffer, sizeof(buffer), kCFStringEncodingASCII); int32 languageId = TransMan.findMatchingLanguage(buffer); if (languageId != -1) { CFRelease(preferredLocalizations); @@ -156,7 +156,7 @@ Common::String OSystem_MacOSX::getSystemLanguage() const { if (localizationsSize > 0) { CFStringRef language = (CFStringRef)CFArrayGetValueAtIndex(preferredLocalizations, 0); char buffer[10]; - CFStringGetCString(language, buffer, 50, kCFStringEncodingASCII); + CFStringGetCString(language, buffer, sizeof(buffer), kCFStringEncodingASCII); CFRelease(preferredLocalizations); return buffer; } |