]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
authorchaac <chaac@localhost>
Tue, 9 May 2006 20:11:11 +0000 (20:11 +0000)
committerchaac <chaac@localhost>
Tue, 9 May 2006 20:11:11 +0000 (20:11 +0000)
        * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
        checking.
        (grub_video_vbe_blit_glyph): Likewise.
        (grub_video_vbe_blit_bitmap): Likewise.
        (grub_video_vbe_blit_render_target): Likewise.

ChangeLog
video/i386/pc/vbe.c

index 26e4006d1f1dd0dbcf60b2c422b7fc5608db5086..f51ac1a3633e9dad61d999ab38e4ed8899cd4bcf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
+
+       * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
+       checking.
+       (grub_video_vbe_blit_glyph): Likewise.
+       (grub_video_vbe_blit_bitmap): Likewise.
+       (grub_video_vbe_blit_render_target): Likewise.
+
 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
 
        * configure.ac (--with-platform): Properly quote the square
index f92c130d75e15ae6c952d51047c2ad191d4447d7..f36fbdbbf007653ce55ec9dc7c397fef6c892afe 100644 (file)
@@ -944,9 +944,9 @@ grub_video_vbe_fill_rect (grub_video_color_t color, int x, int y,
   unsigned int i, j;
 
   /* Make sure there is something to do.  */
-  if ((x > (int)render_target->viewport.width) || (x + (int)width < 0))
+  if ((x >= (int)render_target->viewport.width) || (x + (int)width < 0))
     return GRUB_ERR_NONE;
-  if ((y > (int)render_target->viewport.height) || (y + (int)height < 0))
+  if ((y >= (int)render_target->viewport.height) || (y + (int)height < 0))
     return GRUB_ERR_NONE;
 
   /* Do not allow drawing out of viewport.  */
@@ -1013,10 +1013,10 @@ grub_video_vbe_blit_glyph (struct grub_font_glyph * glyph,
   unsigned int y_offset = 0;
   
   /* Make sure there is something to do.  */
-  if (x > (int)render_target->viewport.width)
+  if (x >= (int)render_target->viewport.width)
     return GRUB_ERR_NONE;
     
-  if (y > (int)render_target->viewport.height)
+  if (y >= (int)render_target->viewport.height)
     return GRUB_ERR_NONE;
 
   /* Calculate glyph dimensions.  */
@@ -1070,9 +1070,9 @@ grub_video_vbe_blit_bitmap (struct grub_video_bitmap * bitmap,
                             unsigned int width, unsigned int height)
 {
   /* Make sure there is something to do.  */
-  if ((x > (int)render_target->viewport.width) || (x + (int)width < 0))
+  if ((x >= (int)render_target->viewport.width) || (x + (int)width < 0))
     return GRUB_ERR_NONE;
-  if ((y > (int)render_target->viewport.height) || (y + (int)height < 0))
+  if ((y >= (int)render_target->viewport.height) || (y + (int)height < 0))
     return GRUB_ERR_NONE;
 
   /* Do not allow drawing out of viewport.  */
@@ -1130,19 +1130,19 @@ grub_video_vbe_blit_render_target (struct grub_video_render_target *source,
   /* Make sure there is something to do.  */
   if ((width == 0) || (height == 0))
     return GRUB_ERR_NONE;
-  if ((x > (int)render_target->viewport.width) || (x + (int)width < 0))
+  if ((x >= (int)render_target->viewport.width) || (x + (int)width < 0))
     return GRUB_ERR_NONE;
-  if ((y > (int)render_target->viewport.height) || (y + (int)height < 0))
+  if ((y >= (int)render_target->viewport.height) || (y + (int)height < 0))
     return GRUB_ERR_NONE;    
   if ((x + (int)source->mode_info.width) < 0)
     return GRUB_ERR_NONE;
   if ((y + (int)source->mode_info.height) < 0)
     return GRUB_ERR_NONE;    
-  if ((offset_x > (int)source->mode_info.width) 
-      || (offset_x + (int)source->mode_info.width < 0))
+  if ((offset_x >= (int)source->mode_info.width) 
+      || (offset_x + (int)width < 0))
     return GRUB_ERR_NONE;
-  if ((offset_y > (int)source->mode_info.height) 
-      || (offset_y + (int)source->mode_info.height < 0))
+  if ((offset_y >= (int)source->mode_info.height) 
+      || (offset_y + (int)height < 0))
     return GRUB_ERR_NONE;    
 
   /* If we have negative coordinates, optimize drawing to minimum.  */