aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-24 22:43:07 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-24 22:43:07 +0100
commit4eeebd0bb31994111a424b51d1e78ec8e68b3f60 (patch)
tree09f53b585821fbc34412999a7e21f80d0ce37a3d /com32/hdt
parent55a72eaa2e5ac2ff007a685d32c9343c32aea432 (diff)
downloadsyslinux.git-4eeebd0bb31994111a424b51d1e78ec8e68b3f60.tar.gz
syslinux.git-4eeebd0bb31994111a424b51d1e78ec8e68b3f60.tar.xz
syslinux.git-4eeebd0bb31994111a424b51d1e78ec8e68b3f60.zip
hdt: Fixing crash on some optical drives
Impact: Prevent some hard crashes On some optical drives, requesting int 13, func 0x48 make the system crash. In fact, if the geometry isn't valid (optical drives), no need to check for extended attributes
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-ata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/com32/hdt/hdt-ata.c b/com32/hdt/hdt-ata.c
index 4e3ea438..eb507d21 100644
--- a/com32/hdt/hdt-ata.c
+++ b/com32/hdt/hdt-ata.c
@@ -196,6 +196,10 @@ int get_disk_params(int disk, struct diskinfo *disk_info)
disk_info[disk].cbios = 1; /* Valid geometry */
}
+ /* If geometry isn't valid, no need to try to get more info about the drive*/
+ /* Looks like in can confuse some optical drives */
+ if (disk_info[disk].cbios != 1) return 0;
+
/* FIXME: memset to 0 make it fails
* memset(__com32.cs_bounce, 0, sizeof(struct device_pairameter)); */
memset(&dp, 0, sizeof(struct device_parameter));