From: LaMont Jones Date: Sun, 8 Jul 2007 23:16:18 +0000 (-0600) Subject: sort malloc call in agetty initstring X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=403ca8adefb8b49cc95d3c79746da312c0176b90;p=util-linux sort malloc call in agetty initstring --- diff --git a/login-utils/agetty.c b/login-utils/agetty.c index b7ae536f..39428580 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c @@ -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; }