diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/logic/pe_get_image_meta.c | 4 | ||||
-rw-r--r-- | src/reader/pe_read_coff_header.c | 2 | ||||
-rw-r--r-- | src/reader/pe_read_dos_header.c | 2 | ||||
-rw-r--r-- | src/reader/pe_read_import_header.c | 2 | ||||
-rw-r--r-- | src/reader/pe_read_optional_header.c | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c index 8d90353..6302f70 100644 --- a/src/logic/pe_get_image_meta.c +++ b/src/logic/pe_get_image_meta.c @@ -105,7 +105,7 @@ int pe_get_image_meta( if ((i >= 0) && (i != s)) return pe_free_image_meta_impl(m, - PERK_CUSTOM_ERROR(dctx,PERK_MALFORMED_IMAGE)); + PERK_CUSTOM_ERROR(dctx,PERK_ERR_IMAGE_MALFORMED)); if (s >= 0) { m->hedata = &m->sectbl[s]; @@ -128,7 +128,7 @@ int pe_get_image_meta( if ((i >= 0) && (i != s)) return pe_free_image_meta_impl(m, - PERK_CUSTOM_ERROR(dctx,PERK_MALFORMED_IMAGE)); + PERK_CUSTOM_ERROR(dctx,PERK_ERR_IMAGE_MALFORMED)); if (s >= 0) { m->hidata = &m->sectbl[s]; diff --git a/src/reader/pe_read_coff_header.c b/src/reader/pe_read_coff_header.c index 619c1cc..5ee62e3 100644 --- a/src/reader/pe_read_coff_header.c +++ b/src/reader/pe_read_coff_header.c @@ -15,7 +15,7 @@ int pe_read_coff_header(const struct pe_coff_file_hdr * p, struct pe_meta_coff_f uint16_t * pzero = (uint16_t *)&p->signature[2]; if ((p->signature[0] != 'P') || (p->signature[1] != 'E') || *pzero) - return PERK_BAD_COFF_HEADER; + return PERK_ERR_BAD_COFF_HEADER; if (PERK_LITTLE_ENDIAN) { diff --git a/src/reader/pe_read_dos_header.c b/src/reader/pe_read_dos_header.c index 0fd0367..7aa9ba5 100644 --- a/src/reader/pe_read_dos_header.c +++ b/src/reader/pe_read_dos_header.c @@ -13,7 +13,7 @@ int pe_read_dos_header(const struct pe_image_dos_hdr * p, struct pe_meta_image_dos_hdr * m) { if ((p->dos_magic[0] != 'M') || (p->dos_magic[1] != 'Z')) - return PERK_BAD_DOS_HEADER; + return PERK_ERR_BAD_DOS_HEADER; if (PERK_LITTLE_ENDIAN) { diff --git a/src/reader/pe_read_import_header.c b/src/reader/pe_read_import_header.c index 645a375..d2b3acd 100644 --- a/src/reader/pe_read_import_header.c +++ b/src/reader/pe_read_import_header.c @@ -47,6 +47,6 @@ int pe_read_import_lookup_item( return 0; default: - return PERK_BAD_IMAGE_TYPE; + return PERK_ERR_BAD_IMAGE_TYPE; } } diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c index 24aa95b..25c1b34 100644 --- a/src/reader/pe_read_optional_header.c +++ b/src/reader/pe_read_optional_header.c @@ -25,7 +25,7 @@ static int pe_read_optional_header_little_endian(const union pe_opt_hdr * p, str memcpy(&m->ldr,&p->opt_hdr_32.loader_flags,sizeof(struct pe_meta_opt_hdr_ldr)); if (m->ldr.rva_and_sizes > 0x10) - return PERK_BAD_IMAGE_TYPE; + return PERK_ERR_BAD_IMAGE_TYPE; else memcpy(&m->dirs,&p->opt_hdr_32.export_tbl,sizeof(struct pe_meta_opt_hdr_dirs)); @@ -38,14 +38,14 @@ static int pe_read_optional_header_little_endian(const union pe_opt_hdr * p, str memcpy(&m->ldr,&p->opt_hdr_64.loader_flags,sizeof(struct pe_meta_opt_hdr_ldr)); if (m->ldr.rva_and_sizes > 0x10) - return PERK_BAD_IMAGE_TYPE; + return PERK_ERR_BAD_IMAGE_TYPE; else memcpy(&m->dirs,&p->opt_hdr_64.export_tbl,sizeof(struct pe_meta_opt_hdr_dirs)); break; default: - return PERK_BAD_IMAGE_TYPE; + return PERK_ERR_BAD_IMAGE_TYPE; } return 0; @@ -80,7 +80,7 @@ static int pe_read_optional_header_big_endian(const union pe_opt_hdr * p, struct break; default: - return PERK_BAD_IMAGE_TYPE; + return PERK_ERR_BAD_IMAGE_TYPE; } /* std */ |