mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-21 22:56:55 +01:00
Chore: replace many sprintf with snprintf. Only one was doubtful - 5 x %f into a small string?
This commit is contained in:
@@ -199,9 +199,9 @@ void http_html_end(http_request_t* request) {
|
||||
|
||||
WiFI_GetMacAddress((char*)mac);
|
||||
|
||||
sprintf(upTimeStr, "<br>Device MAC: %02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
snprintf(upTimeStr, sizeof(upTimeStr), "<br>Device MAC: %02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
poststr(request, upTimeStr);
|
||||
sprintf(upTimeStr, "<br>Short name: %s, Chipset %s", CFG_GetShortDeviceName(), PLATFORM_MCU_NAME);
|
||||
snprintf(upTimeStr, sizeof(upTimeStr), "<br>Short name: %s, Chipset %s", CFG_GetShortDeviceName(), PLATFORM_MCU_NAME);
|
||||
poststr(request, upTimeStr);
|
||||
|
||||
poststr(request, htmlBodyEnd);
|
||||
|
||||
Reference in New Issue
Block a user