Skip to content

Commit

Permalink
Fix always true condition (Thomas Jarosch)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoulasc committed Aug 27, 2017
1 parent d56eb7e commit 35c94dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/readelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "file.h"

#ifndef lint
FILE_RCSID("@(#)$File: readelf.c,v 1.137 2017/08/13 00:21:47 christos Exp $")
FILE_RCSID("@(#)$File: readelf.c,v 1.138 2017/08/27 07:55:02 christos Exp $")
#endif

#ifdef BUILTIN_ELF
Expand Down Expand Up @@ -511,7 +511,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;
Expand Down

1 comment on commit 35c94dc

@carnil
Copy link

@carnil carnil commented on 35c94dc Sep 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit fixes CVE-2017-1000249

Please sign in to comment.