Module Name: src Committed By: christos Date: Fri Nov 18 20:28:17 UTC 2011
Modified Files: src/lib/libc/gen: unvis.c Log Message: initialize t to protect against empty string (Kamil Dudka) To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libc/gen/unvis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/gen/unvis.c diff -u src/lib/libc/gen/unvis.c:1.37 src/lib/libc/gen/unvis.c:1.38 --- src/lib/libc/gen/unvis.c:1.37 Sat Nov 5 23:42:33 2011 +++ src/lib/libc/gen/unvis.c Fri Nov 18 15:28:17 2011 @@ -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 @@ int 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);