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
@ -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 New Issue
Block a user