Skip to content

Commit f0cf225

Browse files
committed
Fix issue introduced in 8501962.
`authenticode->verify_flags` are not really bit flags, they are more like error codes.
1 parent 8501962 commit f0cf225

File tree

1 file changed

+5
-5
lines changed
  • libyara/modules/pe

1 file changed

+5
-5
lines changed

libyara/modules/pe/pe.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -1759,19 +1759,19 @@ void _process_authenticode(
17591759
{
17601760
const Authenticode* authenticode = auth_array->signatures[i];
17611761

1762-
if (authenticode->verify_flags & AUTHENTICODE_VFY_CANT_PARSE)
1762+
if (authenticode->verify_flags == AUTHENTICODE_VFY_CANT_PARSE)
17631763
continue;
17641764

1765-
if (authenticode->verify_flags & AUTHENTICODE_VFY_WRONG_PKCS7_TYPE)
1765+
if (authenticode->verify_flags == AUTHENTICODE_VFY_WRONG_PKCS7_TYPE)
17661766
continue;
17671767

1768-
if (authenticode->verify_flags & AUTHENTICODE_VFY_NO_SIGNER_INFO)
1768+
if (authenticode->verify_flags == AUTHENTICODE_VFY_NO_SIGNER_INFO)
17691769
continue;
17701770

1771-
if (authenticode->verify_flags & AUTHENTICODE_VFY_NO_SIGNER_CERT)
1771+
if (authenticode->verify_flags == AUTHENTICODE_VFY_NO_SIGNER_CERT)
17721772
continue;
17731773

1774-
if (authenticode->verify_flags & AUTHENTICODE_VFY_INTERNAL_ERROR)
1774+
if (authenticode->verify_flags == AUTHENTICODE_VFY_INTERNAL_ERROR)
17751775
continue;
17761776

17771777
bool verified = authenticode->verify_flags == AUTHENTICODE_VFY_VALID;

0 commit comments

Comments
 (0)