Use snprintf instead of sprintf

This commit is contained in:
Kapil Gupta
2022-06-02 19:10:04 +05:30
parent 2aa6853d3e
commit e60ebc0cbe
3 changed files with 17 additions and 15 deletions

View File

@@ -554,7 +554,7 @@ esp_supp_dpp_bootstrap_gen(const char *chan_list, enum dpp_bootstrap_type type,
}
}
sprintf(command, "type=qrcode mac=" MACSTR "%s%s%s%s%s",
os_snprintf(command, 1200, "type=qrcode mac=" MACSTR "%s%s%s%s%s",
MAC2STR(params->mac), uri_chan_list,
key ? "key=" : "", key ? key : "",
params->info_len ? " info=" : "",