You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thenickdude_KVM-Opencore/src/0001-vboxhfs.patch

28 lines
694 B

diff --git a/Staging/VBoxHfs/fsw_hfs.c b/Staging/VBoxHfs/fsw_hfs.c
index a5b3565d..9ca3d0f1 100644
--- a/Staging/VBoxHfs/fsw_hfs.c
+++ b/Staging/VBoxHfs/fsw_hfs.c
@@ -1042,20 +1042,20 @@ fsw_hfs_cmpf_catkey (BTreeKey *btkey1, BTreeKey *btkey2)
for (ac = 0; ac == 0 && apos < ckey1nlen; apos++) {
ac = be16_to_cpu (p1[apos]);
- ac = fsw_to_lower (ac);
+ ac = ac ? fsw_to_lower (ac) : 0xFFFF;
}
/* get next valid character from ckey2 */
for (bc = 0; bc == 0 && bpos < ckey2nlen; bpos++) {
bc = p2[bpos];
- bc = fsw_to_lower (bc);
+ bc = bc ? fsw_to_lower (bc) : 0xFFFF;
}
if (ac != bc)
break;
- if (ac == 0)
+ if (bpos == ckey1nlen)
return 0;
}