Re: [PATCH next 5/8] test_hexdump: Fix sample output if zero bytes requested

David Laight
2025-03-12T19:40:30Z

On Mon, 10 Mar 2025 11:03:07 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Sat, Mar 08, 2025 at 09:34:49AM +0000, David Laight wrote:
> > If 'len' is zero the expected output is an empty string even if
> > 'ascii' is requested.
>
> It's related to the previous one...
> So, seems to me the series need a bit more (re-)thinking...
>

Nope, all its own bug.
This is a request to hexdump zero bytes into a valid buffer size.
hex_dump_to_buffer() gets it right unless the output buffer length
is also zero.

Found when I started doing a full range of tests.

David