From 3cb2f646b0dab8a039053e4399fcb4503b40d569 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Sat, 7 Jun 2025 19:42:38 +0200 Subject: [PATCH 1/2] Fix nullptr instead of NULL argument usage in getaddrinfo(). Bump version. --- UDPSocket.cpp | 2 +- Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UDPSocket.cpp b/UDPSocket.cpp index bb00d1d..79652a0 100644 --- a/UDPSocket.cpp +++ b/UDPSocket.cpp @@ -86,7 +86,7 @@ int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockadd /* Port is always digits, no needs to lookup service */ hints.ai_flags |= AI_NUMERICSERV; - int err = ::getaddrinfo(hostname.empty() ? nullptr : hostname.c_str(), portstr.c_str(), &hints, &res); + int err = ::getaddrinfo(hostname.empty() ? NULL : hostname.c_str(), portstr.c_str(), &hints, &res); if (err != 0) { sockaddr_in* paddr = (sockaddr_in*)&addr; ::memset(paddr, 0x00U, address_length = sizeof(sockaddr_in)); diff --git a/Version.h b/Version.h index d36e569..4ef4b10 100644 --- a/Version.h +++ b/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20250318"; +const char* VERSION = "20250607"; #endif From e139bde022f03a11e568be77cad9225ec4a1d145 Mon Sep 17 00:00:00 2001 From: MW0MWZ <66065904+MW0MWZ@users.noreply.github.com> Date: Wed, 20 Aug 2025 12:25:14 +0100 Subject: [PATCH 2/2] Update Conf.cpp Fix a compile failure --- Conf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Conf.cpp b/Conf.cpp index c8a3bf7..d6efd84 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -23,6 +23,7 @@ #include #include #include +#include const int BUFFER_SIZE = 500;