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:
parent
1288130bd1
commit
1b62ee21f0
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user