mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-30 11:38:38 -07:00
Fix format-truncation warning, missing string.h inclusion and strnlen warning (#723)
* Fix format-truncation warning, missing string.h inclusion and strnlen warning * Dynamic string width field
This commit is contained in:
parent
6a2bd85719
commit
994f21fe01
2 changed files with 4 additions and 1 deletions
|
@ -99,7 +99,7 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
|||
}
|
||||
PrintAndLog(buffer2);
|
||||
} else {
|
||||
snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
|
||||
snprintf(buffer2, sizeof(buffer2), "%s%.*s", prefix, MAX_PRINT_BUFFER - 20, buffer);
|
||||
PrintAndLog(buffer2);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue