Skip to content

Commit

Permalink
Make sure string is NUL byte terminated.
Browse files Browse the repository at this point in the history
  • Loading branch information
George Wang committed Aug 10, 2020
1 parent 4723bd4 commit 07cb275
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sapi/litespeed/lsapilib.c
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 07cb275

Please sign in to comment.