Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/nvi/common fix format string bug, filename may contain ...
details: https://anonhg.NetBSD.org/src/rev/8bb9a1d853e0
branches: trunk
changeset: 749036:8bb9a1d853e0
user: tnozaki <tnozaki%NetBSD.org@localhost>
date: Sat Nov 14 20:01:20 2009 +0000
description:
fix format string bug, filename may contain % character, don't use it as format string.
diffstat:
dist/nvi/common/exf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 4252134946e3 -r 8bb9a1d853e0 dist/nvi/common/exf.c
--- a/dist/nvi/common/exf.c Sat Nov 14 19:06:54 2009 +0000
+++ b/dist/nvi/common/exf.c Sat Nov 14 20:01:20 2009 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index