mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
fix incorrect string termination
if read multi times when waiting for a slow client, then bytes is much shorter than datalen so it could incorrectly terminate the string and data could be lost
This commit is contained in:
parent
59cd3c77d8
commit
4e07845f2d
@ -264,7 +264,7 @@ int ws_handshake(wsh_t *wsh)
|
||||
goto err;
|
||||
}
|
||||
|
||||
*(wsh->buffer+bytes) = '\0';
|
||||
*(wsh->buffer + wsh->datalen) = '\0';
|
||||
|
||||
if (strncasecmp(wsh->buffer, "GET ", 4)) {
|
||||
goto err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user