Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libtelnet Fix memset usage. XXX should use static alloca...



details:   https://anonhg.NetBSD.org/src/rev/c1ff9356921f
branches:  trunk
changeset: 766708:c1ff9356921f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Jul 01 01:15:27 2011 +0000

description:
Fix memset usage. XXX should use static allocate and proper sizeof()

diffstat:

 lib/libtelnet/sra.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 5fa3f4b737d1 -r c1ff9356921f lib/libtelnet/sra.c
--- a/lib/libtelnet/sra.c       Fri Jul 01 01:08:59 2011 +0000
+++ b/lib/libtelnet/sra.c       Fri Jul 01 01:15:27 2011 +0000
@@ -32,7 +32,7 @@
 #ifdef notdef
 __FBSDID("$FreeBSD: src/contrib/telnet/libtelnet/sra.c,v 1.16 2002/05/06 09:48:02 markm Exp $");
 #else
-__RCSID("$NetBSD: sra.c,v 1.8 2005/10/25 23:36:07 christos Exp $");
+__RCSID("$NetBSD: sra.c,v 1.9 2011/07/01 01:15:27 joerg Exp $");
 #endif
 
 #ifdef SRA
@@ -328,7 +328,7 @@
                        (void)strcpy(passprompt, "Password: ");
                }
                /* encode password */
-               memset(pass,0,sizeof(pass));
+               memset(pass,0,256);
                if (telnet_gets(passprompt,pass,255,0) == NULL) {
                        printf("\n");
                        exit(1);



Home | Main Index | Thread Index | Old Index