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
ff3f429dea
commit
0adb64b5d9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228553
@ -1582,7 +1582,7 @@ mget(struct magic_set *ms, const unsigned char *s,
|
|||||||
|
|
||||||
case FILE_INDIRECT:
|
case FILE_INDIRECT:
|
||||||
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
|
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
|
||||||
file_printf(ms, m->desc) == -1)
|
file_printf(ms, "%s", m->desc) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
if (nbytes < offset)
|
if (nbytes < offset)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user