[Libva] [libva-intel-driver PATH] Fix a potential infinite loop

Xiang, Haihao haihao.xiang at intel.com
Thu Mar 3 02:14:21 UTC 2016


It will result in infinite loop if the input fourcc isn't supported
by the driver. This issue is reported by Guangxin

Cc: Xu, Guangxin <Guangxin.Xu at intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
 src/i965_drv_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index c5bec33..b448928 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -234,7 +234,7 @@ get_fourcc_info(unsigned int fourcc)
 {
     unsigned int i;
 
-    for (i = 0; ARRAY_ELEMS(i965_fourcc_infos); i++) {
+    for (i = 0; i < ARRAY_ELEMS(i965_fourcc_infos); i++) {
         const i965_fourcc_info * const info = &i965_fourcc_infos[i];
 
         if (info->fourcc == fourcc)
-- 
1.9.1



More information about the Libva mailing list