Skip to content

Commit eddc939

Browse files
committed
Driver: fixed DarthTon#331
1 parent e66dde8 commit eddc939

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BlackBoneDrv/Utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ LONG BBSafeSearchString( IN PUNICODE_STRING source, IN PUNICODE_STRING target, I
7979
return -1;
8080

8181
USHORT diff = source->Length - target->Length;
82-
for (USHORT i = 0; i < diff; i++)
82+
for (USHORT i = 0; i <= (diff / sizeof( WCHAR )); i++)
8383
{
8484
if (RtlCompareUnicodeStrings(
85-
source->Buffer + i / sizeof( WCHAR ),
85+
source->Buffer + i,
8686
target->Length / sizeof( WCHAR ),
8787
target->Buffer,
8888
target->Length / sizeof( WCHAR ),

0 commit comments

Comments
 (0)