summaryrefslogtreecommitdiffstats
path: root/contrib/amd/libamu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-09-23 05:15:28 +0000
committerobrien <obrien@FreeBSD.org>1999-09-23 05:15:28 +0000
commit5b5a6e51e15a829c008a68a2fefe08b28822d006 (patch)
tree6b2d1962bba634014944e72c5775399ef0591bde /contrib/amd/libamu
parent77d22ec61a6cf25ccc2fd628e9accf8e51f40820 (diff)
parent525520fd05daace78c0d8621f082ede8a143247a (diff)
downloadFreeBSD-src-5b5a6e51e15a829c008a68a2fefe08b28822d006.zip
FreeBSD-src-5b5a6e51e15a829c008a68a2fefe08b28822d006.tar.gz
This commit was generated by cvs2svn to compensate for changes in r51591,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/amd/libamu')
-rw-r--r--contrib/amd/libamu/xutil.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/amd/libamu/xutil.c b/contrib/amd/libamu/xutil.c
index 5ba4938..bd1bcf5 100644
--- a/contrib/amd/libamu/xutil.c
+++ b/contrib/amd/libamu/xutil.c
@@ -422,13 +422,17 @@ real_plog(int lvl, char *fmt, va_list vargs)
expand_error(fmt, efmt, 1024);
+#ifdef HAVE_VSNPRINTF
+ vsnprintf(ptr, 1024, efmt, vargs);
+#else /* not HAVE_VSNPRINTF */
/*
* XXX: ptr is 1024 bytes long. It is possible to write into it
* more than 1024 bytes, if efmt is already large, and vargs expand
- * as well.
+ * as well. This is not as safe as using vsnprintf().
*/
vsprintf(ptr, efmt, vargs);
msg[1023] = '\0'; /* null terminate, to be sure */
+#endif /* not HAVE_VSNPRINTF */
ptr += strlen(ptr);
if (ptr[-1] == '\n')
OpenPOWER on IntegriCloud