mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Fix an incorrectly used conditional causing a stack buffer overflow.
Reported by: Thomas Jarosch of Intra2net AG Reviewed by: emaste, jhb Security: CVE-2017-1000249
This commit is contained in:
parent
c0cd38223c
commit
367cf59651
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323278
|
@ -509,7 +509,7 @@ do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
|
|||
size_t noff, size_t doff, int *flags)
|
||||
{
|
||||
if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 &&
|
||||
type == NT_GNU_BUILD_ID && (descsz >= 4 || descsz <= 20)) {
|
||||
type == NT_GNU_BUILD_ID && (descsz >= 4 && descsz <= 20)) {
|
||||
uint8_t desc[20];
|
||||
const char *btype;
|
||||
uint32_t i;
|
||||
|
|
Loading…
Reference in a new issue