Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/citrus/modules don't use uninitialized variable ('c...



details:   https://anonhg.NetBSD.org/src/rev/e32155cb7f67
branches:  trunk
changeset: 553327:e32155cb7f67
user:      yamt <yamt%NetBSD.org@localhost>
date:      Tue Oct 14 12:50:03 2003 +0000

description:
don't use uninitialized variable ('chlenbak').
the problem reported by Markus Illenseer on tech-userlevel@
and analyzed by enami tsugutomo.

diffstat:

 lib/libc/citrus/modules/citrus_euctw.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 044f133c698b -r e32155cb7f67 lib/libc/citrus/modules/citrus_euctw.c
--- a/lib/libc/citrus/modules/citrus_euctw.c    Tue Oct 14 12:46:44 2003 +0000
+++ b/lib/libc/citrus/modules/citrus_euctw.c    Tue Oct 14 12:50:03 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: citrus_euctw.c,v 1.7 2003/06/26 12:09:57 tshiozak Exp $        */
+/*     $NetBSD: citrus_euctw.c,v 1.8 2003/10/14 12:50:03 yamt Exp $    */
 
 /*-
  * Copyright (c)2002 Citrus Project,
@@ -56,7 +56,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_euctw.c,v 1.7 2003/06/26 12:09:57 tshiozak Exp $");
+__RCSID("$NetBSD: citrus_euctw.c,v 1.8 2003/10/14 12:50:03 yamt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -214,6 +214,8 @@
                return (0);
        }
 
+       chlenbak = psenc->chlen;
+
        /* make sure we have the first byte in the buffer */
        switch (psenc->chlen) {
        case 0:



Home | Main Index | Thread Index | Old Index