Re: [dm-devel] [PATCH] hex2bin: fix access beyond string end

2022-04-27 Thread Andy Shevchenko
On Sun, Apr 24, 2022 at 10:48 PM Mikulas Patocka wrote: > > If we pass too short string to "hex2bin" (and the string size without the > terminating NUL character is even), "hex2bin" reads one byte after the > terminating NUL character. This patch fixes it. > > Signed-off-by: Mikulas Patocka > Cc:

[dm-devel] [PATCH] hex2bin: fix access beyond string end

2022-04-24 Thread Mikulas Patocka
If we pass too short string to "hex2bin" (and the string size without the terminating NUL character is even), "hex2bin" reads one byte after the terminating NUL character. This patch fixes it. Signed-off-by: Mikulas Patocka Cc: sta...@vger.kernel.org --- lib/hexdump.c |9 ++--- 1 file c