Skip to content

fix: check key type in externals dict#270

Merged
plusvic merged 1 commit intoVirusTotal:masterfrom
vthib:check-externals-key-type
Mar 12, 2025
Merged

fix: check key type in externals dict#270
plusvic merged 1 commit intoVirusTotal:masterfrom
vthib:check-externals-key-type

Conversation

@vthib
Copy link
Contributor

@vthib vthib commented Mar 9, 2025

The type of the key for the externals dict in both the compile and the match function was not checked. Providing a dict with non string keys leads to a segfault:

For example:

import yara

rules = yara.compile(source="", externals={ "a": 2 })
rules.match(data="", externals={ 1: 2 })

The type of the key for the externals dict in both the compile and the
match function was not checked. Providing a dict with non string keys
leads to a segfault.
@plusvic plusvic merged commit 3c616fe into VirusTotal:master Mar 12, 2025
2 checks passed
@vthib vthib deleted the check-externals-key-type branch March 24, 2025 23:54
plusvic added a commit that referenced this pull request Apr 30, 2025
plusvic added a commit that referenced this pull request Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants