1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 01:03:12 +02:00

Fix crash in websocket module.

This commit is contained in:
Bram Matthys
2019-03-01 14:10:06 +01:00
parent d7e5ff82f0
commit d068cd41ca
+6 -3
View File
@@ -548,9 +548,12 @@ int websocket_handle_packet(aClient *sptr, char *readbuf, int length)
case WSOP_CONTINUATION:
case WSOP_TEXT:
case WSOP_BINARY:
add_lf_if_needed(&payload, &len);
if (!process_packet(sptr, payload, len, 1)) /* let UnrealIRCd process this data */
return -1; /* fatal error occured (such as flood kill) */
if (len > 0)
{
add_lf_if_needed(&payload, &len);
if (!process_packet(sptr, payload, len, 1)) /* let UnrealIRCd process this data */
return -1; /* fatal error occured (such as flood kill) */
}
return total_packet_size;
case WSOP_CLOSE: