summaryrefslogtreecommitdiffstats
path: root/contrib/file
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-15 23:28:17 +0000
committerdim <dim@FreeBSD.org>2011-12-15 23:28:17 +0000
commit1b62ee21f0843c0c6c29edc4feff3e7795472d68 (patch)
tree4ea238dce6eca94476b05cbad160147cc3967ae9 /contrib/file
parent1288130bd13319920e34b68f23b20efc6ed070a6 (diff)
downloadFreeBSD-src-1b62ee21f0843c0c6c29edc4feff3e7795472d68.zip
FreeBSD-src-1b62ee21f0843c0c6c29edc4feff3e7795472d68.tar.gz
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.) MFC after: 1 week
Diffstat (limited to 'contrib/file')
-rw-r--r--contrib/file/softmagic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/file/softmagic.c b/contrib/file/softmagic.c
index 88f5214..174115e 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;
OpenPOWER on IntegriCloud