VirusTotal / yara

The pattern matching swiss knife
https://virustotal.github.io/yara/
BSD 3-Clause "New" or "Revised" License
8.13k stars 1.42k forks source link

Add an init guard to prevent authenticode parser reinitialize #1923

Closed kylereedmsft closed 1 year ago

kylereedmsft commented 1 year ago

We use libyara in a process that can initialize/finialize and then re-initialize yara. After #1623 was merged, calling initialize the second time caused failures.

This change adds a static guard around the initialize_authenticode_parser call in pe module's initialize so that it won't be initialized more than once per process.

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.