Remove potential format-string attack on log_displayBox on macOS

This commit is contained in:
Michael Martin
2020-06-09 17:38:34 -07:00
parent 86109d570c
commit 1d5cbf3350
+2 -2
View File
@@ -28,9 +28,9 @@ log_displayBox (const /*UTF-8*/char *title, int isError,
return; // Oops, out of memory? return; // Oops, out of memory?
if (isError) if (isError)
NSRunCriticalAlertPanel (titleStr, msgStr, nil, nil, nil); NSRunCriticalAlertPanel (titleStr, @"%@", nil, nil, nil, msgStr);
else else
NSRunInformationalAlertPanel (titleStr, msgStr, nil, nil, nil); NSRunInformationalAlertPanel (titleStr, @"%@", nil, nil, nil, msgStr);
// titleStr and msgStr are autoreleased // titleStr and msgStr are autoreleased
} }