squash gcc debugger warnings

remove nsections>UINT16_MAX check
This commit is contained in:
olszomal
2023-08-29 08:14:11 +02:00
committed by Michał Trojnara
parent 5d2bf2c80f
commit 2d21a2121c
2 changed files with 2 additions and 2 deletions

2
pe.c
View File

@ -919,7 +919,7 @@ static u_char *pe_page_hash_calc(int *rphlen, FILE_FORMAT_CTX *ctx, int phtype)
/* NumberOfSections indicates the size of the section table,
* which immediately follows the headers, can be up to 65535 under Vista and later */
nsections = GET_UINT16_LE(ctx->options->indata + ctx->pe_ctx->header_size + 6);
if (nsections == 0 || nsections > UINT16_MAX) {
if (nsections == 0) {
printf("Corrupted number of sections: 0x%08X\n", nsections);
return NULL; /* FAILED */
}