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
This commit is contained in:
Dimitry Andric 2011-12-15 23:28:17 +00:00
parent ff3f429dea
commit 0adb64b5d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228553

View File

@ -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;