diff options
author | George Wang <gwang@php.net> | 2020-08-10 19:11:03 -0400 |
---|---|---|
committer | George Wang <gwang@php.net> | 2020-08-10 19:11:03 -0400 |
commit | 07cb2755bec2fe4671b35defc9e76f495ce6e9d1 (patch) | |
tree | 607347b37a9b0ee51eb4efcf3b2c9fde48a1049b | |
parent | 4723bd4ffa098b85f39cf8ad3c92009819eb8b6f (diff) | |
download | php-git-07cb2755bec2fe4671b35defc9e76f495ce6e9d1.tar.gz |
Make sure string is NUL byte terminated.
-rw-r--r-- | sapi/litespeed/lsapilib.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 ) { |