[cli] do not pass user-controlled input as format string (#5599)

This commit is contained in:
Jonathan Hui
2020-09-29 21:12:21 -07:00
committed by GitHub
parent 32ffa64902
commit 13d2de89d2
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -327,7 +327,7 @@ void UdpExample::HandleUdpReceive(otMessage *aMessage, const otMessageInfo *aMes
length = otMessageRead(aMessage, otMessageGetOffset(aMessage), buf, sizeof(buf) - 1);
buf[length] = '\0';
mInterpreter.OutputLine(buf);
mInterpreter.OutputLine("%s", buf);
}
} // namespace Cli