]> err.no Git - util-linux/commitdiff
sort malloc call in agetty initstring
authorLaMont Jones <lamont@mix.mmjgroup.com>
Sun, 8 Jul 2007 23:16:18 +0000 (17:16 -0600)
committerLaMont Jones <lamont@mix.mmjgroup.com>
Sun, 8 Jul 2007 23:16:18 +0000 (17:16 -0600)
login-utils/agetty.c

index b7ae536f0e397f774d0ce5f593757aafcc9382ff..39428580cca83563b873bff9a7a4a18b0f9ea55b 100644 (file)
@@ -414,7 +414,7 @@ parse_args(argc, argv, op)
     while (isascii(c = getopt(argc, argv, "I:LH:f:hil:mt:wn"))) {
        switch (c) {
        case 'I':
-           if (!(op->initstring = malloc(strlen(optarg)))) {
+           if (!(op->initstring = malloc(strlen(optarg)+1))) {
                error(_("can't malloc initstring"));
                break;
            }