From 1d5cbf3350a02c423ad6bef6dfd5300d38aa828f Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Tue, 9 Jun 2020 17:38:34 -0700 Subject: [PATCH] Remove potential format-string attack on log_displayBox on macOS --- sc2/src/libs/log/msgbox_macosx.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc2/src/libs/log/msgbox_macosx.m b/sc2/src/libs/log/msgbox_macosx.m index 8d1d30646..cb4adc696 100644 --- a/sc2/src/libs/log/msgbox_macosx.m +++ b/sc2/src/libs/log/msgbox_macosx.m @@ -28,9 +28,9 @@ log_displayBox (const /*UTF-8*/char *title, int isError, return; // Oops, out of memory? if (isError) - NSRunCriticalAlertPanel (titleStr, msgStr, nil, nil, nil); + NSRunCriticalAlertPanel (titleStr, @"%@", nil, nil, nil, msgStr); else - NSRunInformationalAlertPanel (titleStr, msgStr, nil, nil, nil); + NSRunInformationalAlertPanel (titleStr, @"%@", nil, nil, nil, msgStr); // titleStr and msgStr are autoreleased }