From 0adb64b5d96406fe83cf44dd6a63a88d2c291b60 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 15 Dec 2011 23:28:17 +0000 Subject: [PATCH] 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 --- 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 88f5214500db..174115ee08bd 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;