Minor - verify e820 request is large enough to hold response.
authorKevin O'Connor <kevin@koconnor.net>
Thu, 7 May 2009 03:21:13 +0000 (23:21 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 7 May 2009 03:21:13 +0000 (23:21 -0400)
src/system.c

index 798dc25cb3fac9e4fa2fd5f8135c1781ccef9c01..245e9cfb26a75579c0fe91753889d7f42464a495 100644 (file)
@@ -274,7 +274,8 @@ static void
 handle_15e820(struct bregs *regs)
 {
     int count = GET_GLOBAL(e820_count);
-    if (regs->edx != 0x534D4150 || regs->bx >= count) {
+    if (regs->edx != 0x534D4150 || regs->bx >= count
+        || regs->ecx < sizeof(e820_list[0])) {
         set_code_fail(regs, RET_EUNSUPPORTED);
         return;
     }