From: LaMont Jones Date: Tue, 17 Jul 2007 23:47:33 +0000 (-0600) Subject: agetty: fix short malloc in initstring handling X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=503e4f0c5b49fa556d4b0c70311d88ac8cc6df9a;p=util-linux agetty: fix short malloc in initstring handling Signed-off-by: LaMont Jones --- diff --git a/login-utils/agetty.c b/login-utils/agetty.c index d5359d2c..ff27b70b 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c @@ -418,7 +418,7 @@ parse_args(argc, argv, op) op->eightbits = 1; break; case 'I': - if (!(op->initstring = malloc(strlen(optarg)))) { + if (!(op->initstring = malloc(strlen(optarg)+1))) { error(_("can't malloc initstring")); break; }