Skip to content

Commit 35c94dc

Browse files
committed
Fix always true condition (Thomas Jarosch)
1 parent d56eb7e commit 35c94dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/readelf.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "file.h"
2828

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

3333
#ifdef BUILTIN_ELF
@@ -511,7 +511,7 @@ do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
511511
size_t noff, size_t doff, int *flags)
512512
{
513513
if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 &&
514-
type == NT_GNU_BUILD_ID && (descsz >= 4 || descsz <= 20)) {
514+
type == NT_GNU_BUILD_ID && (descsz >= 4 && descsz <= 20)) {
515515
uint8_t desc[20];
516516
const char *btype;
517517
uint32_t i;

0 commit comments

Comments
 (0)