Skip to content

Commit bfa0c5a

Browse files
YaraX rule failures no longer crash. #132
1 parent 90fe9ca commit bfa0c5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gatograderyarax.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ static void callback(const struct YRX_RULE *rule, void *user_data){
4242
}
4343

4444
int GatoGraderYaraX::grade(QByteArray ba){
45-
assert(scanner);
45+
//assert(scanner);
46+
if(!scanner)
47+
return 0;
4648

4749
//Scan the bytes.
4850
this->match=0; //Reset match count.

0 commit comments

Comments
 (0)