From 07cb2755bec2fe4671b35defc9e76f495ce6e9d1 Mon Sep 17 00:00:00 2001 From: George Wang Date: Mon, 10 Aug 2020 19:11:03 -0400 Subject: [PATCH] Make sure string is NUL byte terminated. --- sapi/litespeed/lsapilib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index 30abdd1bbe..b51e668223 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -2622,7 +2622,8 @@ int LSAPI_ParseSockAddr( const char * pBind, struct sockaddr * pAddr ) while( isspace( *pBind ) ) ++pBind; - strncpy( achAddr, pBind, 256 ); + strncpy(achAddr, pBind, 255); + achAddr[255] = 0; switch( *p ) { -- 2.50.1