From 6ef87c5466c0b6ab059d3d9cf4746eb3d8e246f5 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Thu, 3 Aug 2023 07:43:56 +0200 Subject: [PATCH] ftdipp_mpsse: fix format-zero-length snprintf -> memset --- src/ftdipp_mpsse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ftdipp_mpsse.cpp b/src/ftdipp_mpsse.cpp index c3b6abc..ddfe3a1 100644 --- a/src/ftdipp_mpsse.cpp +++ b/src/ftdipp_mpsse.cpp @@ -158,7 +158,7 @@ void FTDIpp_MPSSE::open_device(const std::string &serial, unsigned int baudrate) if (ret < 0) { char description[256]; if (_bus == 0 || _addr == 0) - snprintf(description, sizeof(description), ""); + memset(description, '\0', 256); else #if (FTDI_VERSION < 104) snprintf(description, sizeof(description), "");