From faf00d99a2981791833fe2475d005b9ef11ae750 Mon Sep 17 00:00:00 2001 From: yamt Date: Tue, 14 Oct 2003 12:50:03 +0000 Subject: [PATCH] don't use uninitialized variable ('chlenbak'). the problem reported by Markus Illenseer on tech-userlevel@ and analyzed by enami tsugutomo. --- lib/libc/citrus/modules/citrus_euctw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libc/citrus/modules/citrus_euctw.c b/lib/libc/citrus/modules/citrus_euctw.c index 7ecc410e1dc1..1b2a3c49be7a 100644 --- a/lib/libc/citrus/modules/citrus_euctw.c +++ b/lib/libc/citrus/modules/citrus_euctw.c @@ -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 #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 @@ -214,6 +214,8 @@ _citrus_EUCTW_mbrtowc_priv(_EUCTWEncodingInfo * __restrict ei, return (0); } + chlenbak = psenc->chlen; + /* make sure we have the first byte in the buffer */ switch (psenc->chlen) { case 0: