From 8d57fa0a7fc358cfa3a8a62dac956bec059c50f7 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Fri, 10 Mar 2023 00:08:08 +0100 Subject: [PATCH] [core,aad] fix format strings, use strtok_s --- libfreerdp/core/aad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libfreerdp/core/aad.c b/libfreerdp/core/aad.c index 9752fdf10..967fcd771 100644 --- a/libfreerdp/core/aad.c +++ b/libfreerdp/core/aad.c @@ -337,11 +337,11 @@ static char* aad_read_response(rdpAad* aad, BIO* bio, size_t* plen, const char* WLog_Print(aad->log, WLOG_ERROR, "Unable to read %s HTTP response", what); return NULL; } - WLog_Print(aad->log, WLOG_DEBUG, "%s HTTP response: %s", buffer); + WLog_Print(aad->log, WLOG_DEBUG, "%s HTTP response: %s", what, buffer); if (status_code != 200) { - WLog_Print(aad->log, WLOG_ERROR, "%s HTTP status code: %li", status_code); + WLog_Print(aad->log, WLOG_ERROR, "%s HTTP status code: %li", what, status_code); free(buffer); return NULL; } @@ -849,7 +849,7 @@ static BOOL read_http_message(rdpAad* aad, BIO* bio, long* status_code, char** c } char* val = NULL; - char* name = strtok_r(buffer, ":", &val); + char* name = strtok_s(buffer, ":", &val); if (name && (_stricmp(name, "content-length") == 0)) { errno = 0;