diff --git a/common/wsproto.cpp b/common/wsproto.cpp index 16bd3a9b..50064046 100644 --- a/common/wsproto.cpp +++ b/common/wsproto.cpp @@ -572,7 +572,7 @@ bool WinsockInterfaceClass::Set_Socket_Options(void) if (err == INVALID_SOCKET) { char out[128]; sprintf(out, "TS: Failed to set socket option SO_RCVBUF - error code %d.\n", LastSocketError); - fprintf(stderr, out); + fprintf(stderr, "%s", out); assert(err != INVALID_SOCKET); } @@ -583,7 +583,7 @@ bool WinsockInterfaceClass::Set_Socket_Options(void) if (err == INVALID_SOCKET) { char out[128]; sprintf(out, "TS: Failed to set socket option SO_SNDBUF - error code %d.\n", LastSocketError); - fprintf(stderr, out); + fprintf(stderr, "%s", out); assert(err != INVALID_SOCKET); } diff --git a/redalert/cheklist.cpp b/redalert/cheklist.cpp index 03d00259..abf8f259 100644 --- a/redalert/cheklist.cpp +++ b/redalert/cheklist.cpp @@ -339,7 +339,7 @@ void CheckListClass::Draw_Entry(int index, int x, int y, int width, int selected buffer[0] = UNCHECK_CHAR; } buffer[1] = ' '; - sprintf(&buffer[2], obj->Text); + sprintf(&buffer[2], "%s", obj->Text); TextPrintType flags = TextFlags; RemapControlType* scheme = GadgetClass::Get_Color_Scheme(); diff --git a/tiberiandawn/cheklist.cpp b/tiberiandawn/cheklist.cpp index 90080dc8..0ac25f0b 100644 --- a/tiberiandawn/cheklist.cpp +++ b/tiberiandawn/cheklist.cpp @@ -338,7 +338,7 @@ void CheckListClass::Draw_Entry(int index, int x, int y, int width, int selected buffer[0] = UNCHECK_CHAR; } buffer[1] = ' '; - sprintf(&buffer[2], obj->Text); + sprintf(&buffer[2], "%s", obj->Text); TextPrintType flags = TextFlags; diff --git a/tiberiandawn/netdlg.cpp b/tiberiandawn/netdlg.cpp index 6cb52cd3..3c74ae4c 100644 --- a/tiberiandawn/netdlg.cpp +++ b/tiberiandawn/netdlg.cpp @@ -4076,7 +4076,7 @@ void Net_Reconnect_Dialog(int reconn, int fresh, int oldest_index, unsigned int id = Ipx.Connection_ID(oldest_index); sprintf(buf1, Text_String(TXT_RECONNECTING_TO), Ipx.Connection_Name(id)); } else { - sprintf(buf1, Text_String(TXT_WAITING_FOR_CONNECTIONS)); + sprintf(buf1, "%s", Text_String(TXT_WAITING_FOR_CONNECTIONS)); } sprintf(buf2, Text_String(TXT_TIME_ALLOWED), timeval + 1); buf3 = Text_String(TXT_PRESS_ESC);