Skip to content

Commit

Permalink
minor: Fix possible NULL param in data_output_mqtt_create
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Sep 26, 2023
1 parent 63a049b commit c1fbc71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/output_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ struct data_output *data_output_mqtt_create(struct mg_mgr *mgr, char *param, cha

// parse host and port
tls_opts_t tls_opts = {0};
if (strncmp(param, "mqtts", 5) == 0) {
if (param && strncmp(param, "mqtts", 5) == 0) {
tls_opts.tls_ca_cert = "*"; // TLS is enabled but no cert verification is performed.
}
param = arg_param(param); // strip scheme
Expand Down

0 comments on commit c1fbc71

Please sign in to comment.