hexdump: if size is SIZE_MAX, use strlen()

Similar how we do this as various places: if SIZE_MAX is specified as
size determine the size automatically via strlen().
This commit is contained in:
Lennart Poettering
2025-01-17 17:02:07 +01:00
parent 6e1b24820f
commit ce2ef96c2b
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -866,6 +866,9 @@ void hexdump(FILE *f, const void *p, size_t s) {
assert(b || s == 0);
if (s == SIZE_MAX)
s = strlen(p);
if (!f)
f = stdout;