mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-05-21 12:24:29 +02:00
Protect against client->id NULL dereference.
This commit is contained in:
parent
065c6356d4
commit
eb01459571
|
|
@ -251,7 +251,7 @@ static int _sub_add(struct mosquitto_db *db, struct mosquitto *context, int qos,
|
|||
int i;
|
||||
|
||||
if(!tokens){
|
||||
if(context){
|
||||
if(context && context->id){
|
||||
leaf = subhier->subs;
|
||||
last_leaf = NULL;
|
||||
while(leaf){
|
||||
|
|
|
|||
Loading…
Reference in a new issue