Skip to content

Commit

Permalink
Merge pull request #203 from gerow/fix-print-section-name
Browse files Browse the repository at this point in the history
fix printing section names that are 8 bytes long
  • Loading branch information
GoGoOtaku committed Oct 20, 2023
2 parents fce2890 + 7b6015d commit 25a5d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libpe/pe.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ const char *pe_section_name(const pe_ctx_t *ctx, const IMAGE_SECTION_HEADER *sec
assert(ctx != NULL);
assert(out_name_size >= SECTION_NAME_SIZE+1);
strncpy(out_name, (const char *)section_hdr->Name, SECTION_NAME_SIZE);
out_name[SECTION_NAME_SIZE-1] = '\0';
out_name[SECTION_NAME_SIZE] = '\0';
if (out_name[0] == '/' && out_name[1] >= '0' && out_name[1] <= '9' && ctx->pe.strings_ptr) {
char *endptr = NULL;
long int offset = -1;
Expand Down

0 comments on commit 25a5d31

Please sign in to comment.