summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/ide_disk.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dev/ide_disk.cc b/src/dev/ide_disk.cc
index 7298da521..2c8dfceb1 100644
--- a/src/dev/ide_disk.cc
+++ b/src/dev/ide_disk.cc
@@ -90,6 +90,8 @@ IdeDisk::IdeDisk(const Params *p)
} else {
if (lba_size >= 63)
sectors = 63;
+ else if (lba_size == 0)
+ panic("Bad IDE image size: 0\n");
else
sectors = lba_size;