Merge pull request #1268 from tillz/fix_client_nullptr

Fixed Segmentation Fault / NULLptr dereference
pull/1304/head
Roger Light 6 years ago committed by GitHub
commit c411b737f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -662,6 +662,10 @@ int client_config_line_proc(struct mosq_config *cfg, int pub_or_sub, int argc, c
return 1;
}
topic = strchr(url, '/');
if(!topic){
fprintf(stderr, "Error: invalid URL for -L argument specified.\n\n");
return 1;
}
*topic++ = 0;
if(cfg_add_topic(cfg, pub_or_sub, topic, "-L topic"))

Loading…
Cancel
Save