projects
/
platform
/
upstream
/
libva-intel-driver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d3995e
)
Fix vaGetImage() bounds checking code.
author
Gwenole Beauchesne
<gbeauchesne@splitted-desktop.com>
Mon, 12 Jul 2010 06:34:37 +0000
(08:34 +0200)
committer
Xiang, Haihao
<haihao.xiang@intel.com>
Mon, 12 Jul 2010 07:45:05 +0000
(15:45 +0800)
i965_drv_video.c
patch
|
blob
|
history
diff --git
a/i965_drv_video.c
b/i965_drv_video.c
index
8f893a1
..
b8d622d
100644
(file)
--- a/
i965_drv_video.c
+++ b/
i965_drv_video.c
@@
-1541,9
+1541,11
@@
i965_GetImage(VADriverContextP ctx,
if (x < 0 || y < 0)
return VA_STATUS_ERROR_INVALID_PARAMETER;
- if (width > obj_surface->width || height > obj_surface->height)
+ if (x + width > obj_surface->orig_width ||
+ y + height > obj_surface->orig_height)
return VA_STATUS_ERROR_INVALID_PARAMETER;
- if (width > obj_image->image.width || height > obj_image->image.height)
+ if (x + width > obj_image->image.width ||
+ y + height > obj_image->image.height)
return VA_STATUS_ERROR_INVALID_PARAMETER;
VAStatus va_status;