Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-intel-common-vaapi: Commit

hardware/intel/common/vaapi


Commit MetaInfo

Révisiond3d961aa2a8ed3ac092cd5994378ae5ff9248fe4 (tree)
l'heure2017-08-11 09:08:36
AuteurU. Artie Eoff <ullysses.a.eoff@inte...>
CommiterXiang, Haihao

Message de Log

avoid NULL pointer deref in i965_CreateConfig

The attrib_found pointer variable might be NULL in many cases.
Thus, check it before attempting to dereference it.

Fixes #246

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>

Change Summary

Modification

--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1305,10 +1305,10 @@ i965_CreateConfig(VADriverContextP ctx,
13051305 case VAProfileH264ConstrainedBaseline:
13061306 case VAProfileH264Main:
13071307 case VAProfileH264High:
1308- if ((entrypoint == VAEntrypointEncSlice) &&
1308+ if ((entrypoint == VAEntrypointEncSlice) && attrib_found &&
13091309 !(attrib_found->value & i965->codec_info->h264_brc_mode))
13101310 vaStatus = VA_STATUS_ERROR_INVALID_CONFIG;
1311- else if ((entrypoint == VAEntrypointEncSliceLP) &&
1311+ else if ((entrypoint == VAEntrypointEncSliceLP) && attrib_found &&
13121312 !(attrib_found->value & i965->codec_info->lp_h264_brc_mode))
13131313 vaStatus = VA_STATUS_ERROR_INVALID_CONFIG;
13141314 break;
Afficher sur ancien navigateur de dépôt.