Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
f0602bba
Commit
f0602bba
authored
Dec 14, 2016
by
Yaowu Xu
Browse files
Prevent null pointer de-referencing
Change-Id: If56a76cee9a5f9ad985019e7059e422445bdab51
parent
025b2545
Changes
1
Hide whitespace changes
Inline
Side-by-side
av1/common/mvref_common.c
View file @
f0602bba
...
...
@@ -594,7 +594,9 @@ static void find_mv_refs_idx(const AV1_COMMON *cm, const MACROBLOCKD *xd,
const
POSITION
*
const
mv_ref
=
&
mv_ref_search
[
i
];
if
(
is_inside
(
tile
,
mi_col
,
mi_row
,
mv_ref
))
{
const
MB_MODE_INFO
*
const
candidate
=
&
xd
->
mi
[
mv_ref
->
col
+
mv_ref
->
row
*
xd
->
mi_stride
]
->
mbmi
;
!
xd
->
mi
[
mv_ref
->
col
+
mv_ref
->
row
*
xd
->
mi_stride
]
?
NULL
:
&
xd
->
mi
[
mv_ref
->
col
+
mv_ref
->
row
*
xd
->
mi_stride
]
->
mbmi
;
#if CONFIG_REF_MV
if
(
candidate
==
NULL
)
continue
;
if
((
mi_row
%
MAX_MIB_SIZE
)
+
mv_ref
->
row
>=
MAX_MIB_SIZE
||
...
...
@@ -646,7 +648,9 @@ static void find_mv_refs_idx(const AV1_COMMON *cm, const MACROBLOCKD *xd,
const
POSITION
*
mv_ref
=
&
mv_ref_search
[
i
];
if
(
is_inside
(
tile
,
mi_col
,
mi_row
,
mv_ref
))
{
const
MB_MODE_INFO
*
const
candidate
=
&
xd
->
mi
[
mv_ref
->
col
+
mv_ref
->
row
*
xd
->
mi_stride
]
->
mbmi
;
!
xd
->
mi
[
mv_ref
->
col
+
mv_ref
->
row
*
xd
->
mi_stride
]
?
NULL
:
&
xd
->
mi
[
mv_ref
->
col
+
mv_ref
->
row
*
xd
->
mi_stride
]
->
mbmi
;
#if CONFIG_REF_MV
if
(
candidate
==
NULL
)
continue
;
if
((
mi_row
%
MAX_MIB_SIZE
)
+
mv_ref
->
row
>=
MAX_MIB_SIZE
||
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment