Skip to content

Commit 2d21a21

Browse files
olszomalmtrojnar
authored andcommitted
squash gcc debugger warnings
remove nsections>UINT16_MAX check
1 parent 5d2bf2c commit 2d21a21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ static void dirtree_save(MSI_DIRENT *dirent, BIO *outdata, MSI_OUT *out)
19521952
static int fat_save(BIO *outdata, MSI_OUT *out)
19531953
{
19541954
char buf[MAX_SECTOR_SIZE];
1955-
uint32_t i, j, remain, difatSectors, difatEntriesPerSector, fatSectorIndex, lastFatSectorIndex;
1955+
uint32_t i, j, remain, difatSectors, difatEntriesPerSector = 0, fatSectorIndex, lastFatSectorIndex;
19561956

19571957
remain = (out->fatLen + out->sectorSize - 1) / out->sectorSize;
19581958
out->fatSectorsCount = (out->fatLen + remain * 4 + out->sectorSize - 1) / out->sectorSize;

pe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ static u_char *pe_page_hash_calc(int *rphlen, FILE_FORMAT_CTX *ctx, int phtype)
919919
/* NumberOfSections indicates the size of the section table,
920920
* which immediately follows the headers, can be up to 65535 under Vista and later */
921921
nsections = GET_UINT16_LE(ctx->options->indata + ctx->pe_ctx->header_size + 6);
922-
if (nsections == 0 || nsections > UINT16_MAX) {
922+
if (nsections == 0) {
923923
printf("Corrupted number of sections: 0x%08X\n", nsections);
924924
return NULL; /* FAILED */
925925
}

0 commit comments

Comments
 (0)