From 57e991eeaf037806e425a48bc6d6bc466b3f74d9 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 31 Dec 2011 14:21:41 +0000 Subject: [PATCH] MFC r228553: In contrib/file/softmagic.c, fix a potential format string security problem. (This fix has already been applied upstream, but we do not have the latest version of file in the tree at the moment.) git-svn-id: svn://svn.freebsd.org/base/stable/9@229095 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/file/softmagic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/file/softmagic.c b/contrib/file/softmagic.c index 88f521450..174115ee0 100644 --- a/contrib/file/softmagic.c +++ b/contrib/file/softmagic.c @@ -1582,7 +1582,7 @@ mget(struct magic_set *ms, const unsigned char *s, case FILE_INDIRECT: if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 && - file_printf(ms, m->desc) == -1) + file_printf(ms, "%s", m->desc) == -1) return -1; if (nbytes < offset) return 0; -- 2.45.0