Skip to content
8 changes: 5 additions & 3 deletions drivers/filesystems/udfs/udf_info/dirtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,11 @@ UDFBuildHashEntry(
UName.MaximumLength = Name->Length;
UName.Buffer = (PWCHAR)FsRtlAllocatePoolWithTag(NonPagedPool, UName.MaximumLength, TAG_FILE_NAME);

RtlUpcaseUnicodeString(&UName, Name, FALSE);
hashes->hLfn = crc32((uint8*)(UName.Buffer), UName.Length);
ExFreePoolWithTag(UName.Buffer, TAG_FILE_NAME);
if (UName.Buffer) {
RtlUpcaseUnicodeString(&UName, Name, FALSE);
hashes->hLfn = crc32((uint8*)(UName.Buffer), UName.Length);
ExFreePoolWithTag(UName.Buffer, TAG_FILE_NAME);
}
}

if (Mask & HASH_DOS) {
Expand Down