Module Name:    src
Committed By:   tnozaki
Date:           Sat Nov 14 20:01:20 UTC 2009

Modified Files:
        src/dist/nvi/common: exf.c

Log Message:
fix format string bug, filename may contain % character, don't use it as format 
string.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/common/exf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/dist/nvi/common/exf.c
diff -u src/dist/nvi/common/exf.c:1.3 src/dist/nvi/common/exf.c:1.4
--- src/dist/nvi/common/exf.c:1.3	Tue Dec  9 18:26:20 2008
+++ src/dist/nvi/common/exf.c	Sat Nov 14 20:01:20 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: exf.c,v 1.3 2008/12/09 18:26:20 christos Exp $ */
+/*	$NetBSD: exf.c,v 1.4 2009/11/14 20:01:20 tnozaki Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -945,7 +945,7 @@
 	 * Note that this code is harmless if you're using libc 4.6.x.
 	 */
 	if (LF_ISSET(FS_APPEND) && lseek(fd, (off_t)0, SEEK_END) < 0) {
-		msgq(sp, M_SYSERR, name);
+		msgq(sp, M_SYSERR, "%s", name);
 		return (1);
 	}
 #endif
@@ -1064,7 +1064,7 @@
 			*--s = '.';
 		}
 	}
-	msgq(sp, M_INFO, s);
+	msgq(sp, M_INFO, "%s", s);
 	if (nf)
 		FREE_SPACE(sp, p, 0);
 	return (0);

Reply via email to