1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

COVA14522: extra check for valid protocol

This commit is contained in:
Andy Green 2019-08-07 07:11:08 +01:00
parent 71b7fd8597
commit ace1f432f3

View file

@ -468,7 +468,7 @@ just_kill_connection:
if (!wsi->protocol && wsi->vhost && wsi->vhost->protocols)
pro = &wsi->vhost->protocols[0];
if (!wsi->upgraded_to_http2 || !lwsi_role_client(wsi))
if (pro && (!wsi->upgraded_to_http2 || !lwsi_role_client(wsi)))
/*
* The network wsi for a client h2 connection shouldn't
* call back for its role: the child stream connections