mirror of
https://github.com/nasa/trick.git
synced 2025-06-20 08:03:55 +00:00
* Replace sprintf with snprintf in all of Trick source. #1384 * Don't add -Werror for MacOS because of deprecated sprintf warnings which we cant get rid of because SWIG. #1384 * Fixed an unbalanced parenthesis in S_overrides.mk. #1384
This commit is contained in:
@ -208,7 +208,7 @@ int VariableServerSession::sendErrorMessage(const char* fmt, ... ) {
|
||||
(void) vsnprintf(errText, MAX_MSG_SIZE, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
sprintf(msgText, "{ \"msg_type\" : \"error\",\n"
|
||||
snprintf(msgText, sizeof(msgText), "{ \"msg_type\" : \"error\",\n"
|
||||
" \"error\" : \"%s\"}\n", errText);
|
||||
|
||||
mg_websocket_write(connection, MG_WEBSOCKET_OPCODE_TEXT, msgText, strlen(msgText));
|
||||
|
Reference in New Issue
Block a user