From 86ea6f748ee1e6559c674efdec436e86e608753a Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 12 Oct 2022 10:53:41 +0100 Subject: xxd: avoid use of uninitialised variable If xxd is run with '-r' but no '-s' the value of opt_s passed to reverse() is uninitialised. This patch has been submitted upstream but hasn't been applied yet. --- util-linux/hexdump_xxd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c index 6629407de..9173f5d43 100644 --- a/util-linux/hexdump_xxd.c +++ b/util-linux/hexdump_xxd.c @@ -229,7 +229,11 @@ int xxd_main(int argc UNUSED_PARAM, char **argv) { char buf[80]; dumper_t *dumper; +#if !ENABLE_PLATFORM_MINGW32 char *opt_l, *opt_s, *opt_o; +#else + char *opt_l, *opt_s = NULL, *opt_o; +#endif unsigned bytes = 2; unsigned cols = 0; unsigned opt; -- cgit v1.2.3-55-g6feb