From 403ca8adefb8b49cc95d3c79746da312c0176b90 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Sun, 8 Jul 2007 17:16:18 -0600 Subject: [PATCH] sort malloc call in agetty initstring --- login-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5