Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen initialize t to protect against empty string (K...
details: https://anonhg.NetBSD.org/src/rev/19d628ddb83b
branches: trunk
changeset: 771298:19d628ddb83b
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 18 20:28:17 2011 +0000
description:
initialize t to protect against empty string (Kamil Dudka)
diffstat:
lib/libc/gen/unvis.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 30d1865ae716 -r 19d628ddb83b lib/libc/gen/unvis.c
--- a/lib/libc/gen/unvis.c Fri Nov 18 20:25:48 2011 +0000
+++ b/lib/libc/gen/unvis.c Fri Nov 18 20:28:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unvis.c,v 1.37 2011/11/06 03:42:33 christos Exp $ */
+/* $NetBSD: unvis.c,v 1.38 2011/11/18 20:28:17 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: unvis.c,v 1.37 2011/11/06 03:42:33 christos Exp $");
+__RCSID("$NetBSD: unvis.c,v 1.38 2011/11/18 20:28:17 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -488,7 +488,7 @@
strnunvisx(char *dst, size_t dlen, const char *src, int flag)
{
char c;
- char t, *start = dst;
+ char t = '\0', *start = dst;
int state = 0;
_DIAGASSERT(src != NULL);
Home |
Main Index |
Thread Index |
Old Index