Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


It seems FreeBSD sets the cursor to an out-of-screen location while booting. This...
[palacios.git] / palacios / src / devices / cga.c
index 119709f..0e36c9c 100644 (file)
@@ -300,6 +300,10 @@ int v3_cons_get_fb(struct vm_device * frontend_dev, uint8_t * dst, uint_t offset
     PrintDebug("Getting framebuffer for screen; framebuf=%p, screen_offset=%d, offset=%d, length=%d\n", 
               state->framebuf, screen_byte_offset, offset, length);
 
+    V3_ASSERT(screen_byte_offset <= FRAMEBUF_SIZE - SCREEN_SIZE);
+    V3_ASSERT(offset < SCREEN_SIZE);
+    V3_ASSERT(length <= SCREEN_SIZE);
+    V3_ASSERT(offset + length <= SCREEN_SIZE);
     memcpy(dst, state->framebuf + screen_byte_offset + offset, length);
 
     return 0;