]> Zhao Yanbai Git Server - minix.git/commitdiff
shutdown(8): buffer accessed beyond end during option parsing
authorDavid van Moolenbroek <david@minix3.org>
Thu, 9 Sep 2010 08:48:47 +0000 (08:48 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 9 Sep 2010 08:48:47 +0000 (08:48 +0000)
commands/reboot/shutdown.c

index 11a7256800a58b25669c24623c04fe159fdc3627..74b5770f16b55493072bfdc7d517700186862a88 100644 (file)
@@ -160,7 +160,7 @@ char *argv[];
            opt=argv[i];
          }
          reboot_code=opt;
-         opt="";
+         opt+=strlen(opt)-1;
        }
        break;
       case 'R':