Fix potential crash when reloading config.

Closes #1424, #1425. Thanks to JinPingChng and peteakalad.
pull/1431/head
Roger A. Light 6 years ago
parent 1a8c44b84f
commit 9584463c75

@ -3,6 +3,7 @@
Broker:
- Add workaround for working with libwebsockets 3.2.0.
- Fix potential crash when reloading config. Closes #1424, #1425.
Client library:
- Don't use `/` in autogenerated client ids, to avoid confusing with topics.

@ -1012,7 +1012,7 @@ int mosquitto_security_apply_default(struct mosquitto_db *db)
/* Check for connected clients that are no longer authorised */
#ifdef WITH_TLS
if(context->listener->ssl_ctx && (context->listener->use_identity_as_username || context->listener->use_subject_as_username)){
if(context->listener && context->listener->ssl_ctx && (context->listener->use_identity_as_username || context->listener->use_subject_as_username)){
/* Client must have either a valid certificate, or valid PSK used as a username. */
if(!context->ssl){
if(context->protocol == mosq_p_mqtt5){

Loading…
Cancel
Save