Refactored all the sprintf to use snprintf instead. (#628)

This commit is contained in:
Steve Karg
2024-04-27 12:41:45 -05:00
committed by GitHub
parent 70c54817fd
commit bb276e2431
46 changed files with 308 additions and 272 deletions
+1 -1
View File
@@ -597,7 +597,7 @@ static char *ntoa(uint32_t addr)
{
static char buffer[18];
sprintf(buffer, "%d.%d.%d.%d", (addr & 0x000000FF),
snprintf(buffer, sizeof(buffer), "%d.%d.%d.%d", (addr & 0x000000FF),
(addr & 0x0000FF00) >> 8, (addr & 0x00FF0000) >> 16,
(addr & 0xFF000000) >> 24);