win32: fixes for sigtool imphash linking

pull/60/head
Kevin Lin 9 years ago
parent 67f8441d5e
commit 8d37842072
  1. 8
      libclamav/pe.c
  2. 2
      sigtool/sigtool.c
  3. 1
      win32/libclamav.def

@ -238,8 +238,8 @@ struct pe_image_import_descriptor {
uint32_t FirstThunk;
};
#define IMAGE_ORDINAL_FLAG32 0x80000000
#define IMAGE_ORDINAL_FLAG64 0x8000000000000000L
#define PE_IMAGEDIR_ORDINAL_FLAG32 0x80000000
#define PE_IMAGEDIR_ORDINAL_FLAG64 0x8000000000000000L
struct pe_image_thunk32 {
union {
@ -2301,7 +2301,7 @@ static inline int hash_impfns(cli_ctx *ctx, void **hashctx, uint32_t *impsz, str
thunk32.u.Ordinal = EC32(thunk32.u.Ordinal);
if (!(thunk32.u.Ordinal & IMAGE_ORDINAL_FLAG32)) {
if (!(thunk32.u.Ordinal & PE_IMAGEDIR_ORDINAL_FLAG32)) {
offset = cli_rawaddr(thunk32.u.Function, exe_sections, nsections, &err, fsize, hdr_size);
if (offset >= 0) {
@ -2337,7 +2337,7 @@ static inline int hash_impfns(cli_ctx *ctx, void **hashctx, uint32_t *impsz, str
thunk64.u.Ordinal = EC64(thunk64.u.Ordinal);
if (!(thunk64.u.Ordinal & IMAGE_ORDINAL_FLAG64)) {
if (!(thunk64.u.Ordinal & PE_IMAGEDIR_ORDINAL_FLAG64)) {
offset = cli_rawaddr(thunk64.u.Function, exe_sections, nsections, &err, fsize, hdr_size);
if (offset >= 0) {

@ -252,8 +252,6 @@ static int hashpe(const char *filename, unsigned int class, int type)
return -1;
}
cli_debug_flag = 0;
/* THIS MAY BE UNNECESSARY */
switch(ret) {
case CL_CLEAN:

@ -178,6 +178,7 @@ EXPORTS cli_ldbtokenize @44380 NONAME
EXPORTS cli_hwp5header @44381 NONAME
EXPORTS cli_scanhwp5_stream @44382 NONAME
EXPORTS cli_scanhwp3 @44383 NONAME
EXPORTS cli_genhash_pe @44384 NONAME
; compatibility layer, tommath, zlib
EXPORTS w32_srand @44269 NONAME

Loading…
Cancel
Save