diff options
| author | Peter Jones <pjones@redhat.com> | 2025-02-24 12:00:33 -0500 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2025-02-25 19:40:54 -0500 |
| commit | c868d54def8cebd151964fdeaa8257932b8cfc39 (patch) | |
| tree | 9d3e63f966d64938417531704a887fc5dbd1e001 | |
| parent | 9269e9b0aa15ae9832f7eba6c5eeef0c5e1f4edb (diff) | |
| download | efi-boot-shim-c868d54def8cebd151964fdeaa8257932b8cfc39.tar.gz efi-boot-shim-c868d54def8cebd151964fdeaa8257932b8cfc39.zip | |
hexdump: give a different debug log for size==0
Signed-off-by: Peter Jones <pjones@redhat.com>
| -rw-r--r-- | include/hexdump.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/hexdump.h b/include/hexdump.h index e8f4fe1a..6f3d5fa5 100644 --- a/include/hexdump.h +++ b/include/hexdump.h @@ -89,10 +89,14 @@ vhexdumpf(const char *file, int line, const char *func, const CHAR16 *const fmt, if (verbose == 0) return; - if (!data || !size) { + if (!data) { dprint(L"hexdump of a NULL pointer!\n"); return; } + if (!size) { + dprint(L"hexdump of a 0 size region!\n"); + return; + } while (offset < size) { char hexbuf[49]; |
