[test] replace sprintf with snprintf in otPlatDiagProcess() (#8549)

It also removes stale comments in `ncp_hdlc.cp` about use of
`sprintf`.
This commit is contained in:
Abtin Keshavarzian
2022-12-19 12:12:45 -08:00
committed by GitHub
parent b366867de2
commit a09e8813f9
2 changed files with 2 additions and 7 deletions
+2 -2
View File
@@ -193,9 +193,9 @@ exit:
return error;
}
OT_TOOL_WEAK void otPlatDiagProcess(otInstance *, uint8_t, char *aArgs[], char *aOutput, size_t)
OT_TOOL_WEAK void otPlatDiagProcess(otInstance *, uint8_t, char *aArgs[], char *aOutput, size_t aOutputMaxLen)
{
sprintf(aOutput, "diag feature '%s' is not supported\r\n", aArgs[0]);
snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", aArgs[0]);
}
OT_TOOL_WEAK void otPlatDiagModeSet(bool aMode) { sDiagMode = aMode; }