[git commit] xxd: fix use of non-initialized data

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 2 15:59:40 UTC 2023


commit: https://git.busybox.net/busybox/commit/?id=adb1c7dcfe14132f2a5e0947d1af3eb50c751327
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 util-linux/hexdump_xxd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c
index 45391b565..b5942899e 100644
--- a/util-linux/hexdump_xxd.c
+++ b/util-linux/hexdump_xxd.c
@@ -229,7 +229,8 @@ int xxd_main(int argc UNUSED_PARAM, char **argv)
 {
 	char buf[80];
 	dumper_t *dumper;
-	char *opt_l, *opt_s, *opt_o;
+	char *opt_l, *opt_o;
+	char *opt_s = NULL;
 	unsigned bytes = 2;
 	unsigned cols = 0;
 	unsigned opt;


More information about the busybox-cvs mailing list