summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2016-03-03 10:01:19 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2016-03-04 12:30:13 +0800
commit4664dc66feb0630b668978aba703365f28627c36 (patch)
treec73c28c23b9337dd23493bac40a76b3251324a74
parentc60283ab1423aa6323723beb5335b52c1adf8f6f (diff)
Fix a potential infinite loop
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@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--src/i965_drv_video.c2
1 files changed, 1 insertions, 1 deletions
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)