From 148f0ea775e9008f0d3ee843aeea835d0c6f8854 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 20 May 2025 10:49:17 +0200 Subject: [PATCH] detect/ftp: fix -Wshorten-64-to-32 warnings Ticket: #6186 --- src/detect-ftp-completion-code.c | 2 +- src/output-json-ftp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detect-ftp-completion-code.c b/src/detect-ftp-completion-code.c index ed457a1bb9..682b5a76a6 100644 --- a/src/detect-ftp-completion-code.c +++ b/src/detect-ftp-completion-code.c @@ -72,7 +72,7 @@ static bool DetectFTPCompletionCodeGetData(DetectEngineThreadCtx *_det_ctx, cons DEBUG_VALIDATE_BUG_ON(wrapper->response == NULL); if (index == count) { *buffer = (const uint8_t *)wrapper->response->code; - *buffer_len = wrapper->response->code_length; + *buffer_len = (uint32_t)wrapper->response->code_length; return true; } count++; diff --git a/src/output-json-ftp.c b/src/output-json-ftp.c index 839db2c9d5..432596b136 100644 --- a/src/output-json-ftp.c +++ b/src/output-json-ftp.c @@ -105,7 +105,7 @@ bool EveFTPLogCommand(void *vtx, SCJsonBuilder *jb) is_cc_array_open = true; } SCJbAppendStringFromBytes( - jb, (const uint8_t *)response->code, response->code_length); + jb, (const uint8_t *)response->code, (uint32_t)response->code_length); } if (response->length) { SCJbAppendStringFromBytes(js_resplist, (const uint8_t *)response->response,