From 2bda06bbb50f223f99fbf3a775905f01bfefe7fc Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Thu, 9 Sep 2010 08:48:47 +0000 Subject: [PATCH] shutdown(8): buffer accessed beyond end during option parsing --- commands/reboot/shutdown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/reboot/shutdown.c b/commands/reboot/shutdown.c index 11a725680..74b5770f1 100644 --- a/commands/reboot/shutdown.c +++ b/commands/reboot/shutdown.c @@ -160,7 +160,7 @@ char *argv[]; opt=argv[i]; } reboot_code=opt; - opt=""; + opt+=strlen(opt)-1; } break; case 'R': -- 2.44.0