Skip to content

Commit 2840fa7

Browse files
wxsBSDplusvic
authored andcommitted
Compare the 'wide' bytes to null. (VirusTotal#831)
1 parent 6c39006 commit 2840fa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libyara/scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static int _yr_scan_wcompare(
114114
if (data_size < string_length * 2)
115115
return 0;
116116

117-
while (i < string_length && *s1 == *s2)
117+
while (i < string_length && *s1 == *s2 && *(s1 + 1) == 0x00)
118118
{
119119
s1+=2;
120120
s2++;

0 commit comments

Comments
 (0)