From 503e4f0c5b49fa556d4b0c70311d88ac8cc6df9a Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 17 Jul 2007 17:47:33 -0600 Subject: [PATCH] agetty: fix short malloc in initstring handling Signed-off-by: LaMont Jones --- 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 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; } -- 2.39.5