]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
fix alloca/strlen bug
authornotting <notting>
Mon, 8 Oct 2001 15:14:50 +0000 (15:14 +0000)
committernotting <notting>
Mon, 8 Oct 2001 15:14:50 +0000 (15:14 +0000)
entry.c

diff --git a/entry.c b/entry.c
index 154edba713220a82771030532c1710480702af66..0c70e6ad64d08c7fd947d47423070566a232c29f 100644 (file)
--- a/entry.c
+++ b/entry.c
@@ -142,7 +142,7 @@ static void entryDraw(newtComponent co) {
     if (en->flags & NEWT_FLAG_PASSWORD) {
        char *tmpptr, *p;
 
-       tmpptr = alloca(strlen(chptr+2));
+       tmpptr = alloca(strlen(chptr)+2));
        strcpy(tmpptr, chptr);
        for (p = tmpptr; *p; p++)
            *p = '*';