Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
4d1b0d2a
Commit
4d1b0d2a
authored
14 years ago
by
John Koleszar
Browse files
Options
Download
Plain Diff
Merge commit 'fix integer promotion bug in partition size check'
Change-Id: I4081917b46013fa8f4218cade8bd12cb2d013aee
parents
5551ef0e
9fb80f71
v1.14.0-linphone
1.4.X
bali
cayuga
eider
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m29-baseline
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/atna/dec_sem_sync
sandbox/awatry/initial_opencl_implementation
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/hlundin/error-concealment
sandbox/holmer/error-concealment
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jkoleszar/cached-multibit
sandbox/jkoleszar/experimental-knobs
sandbox/jkoleszar/new-rate-control
sandbox/jkoleszar/new-rtcd
sandbox/jkoleszar/reuse-modemv
sandbox/jkoleszar/use-memcpy
sandbox/jzern@google.com/test
sandbox/slavarnway/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
stable-vp9-decoder
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
vp9-preview
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
v1.2.0
v1.1.0
v1.0.0
v0.9.7
v0.9.7-p1
v0.9.6
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp8/decoder/decodframe.c
+4
-2
vp8/decoder/decodframe.c
vp8/vp8_dx_iface.c
+8
-2
vp8/vp8_dx_iface.c
with
12 additions
and
4 deletions
vp8/decoder/decodframe.c
+
4
−
2
View file @
4d1b0d2a
...
@@ -461,7 +461,8 @@ static void setup_token_decoder(VP8D_COMP *pbi,
...
@@ -461,7 +461,8 @@ static void setup_token_decoder(VP8D_COMP *pbi,
partition_size
=
user_data_end
-
partition
;
partition_size
=
user_data_end
-
partition
;
}
}
if
(
user_data_end
-
partition
<
partition_size
)
if
(
partition
+
partition_size
>
user_data_end
||
partition
+
partition_size
<
partition
)
vpx_internal_error
(
&
pc
->
error
,
VPX_CODEC_CORRUPT_FRAME
,
vpx_internal_error
(
&
pc
->
error
,
VPX_CODEC_CORRUPT_FRAME
,
"Truncated packet or corrupt partition "
"Truncated packet or corrupt partition "
"%d length"
,
i
+
1
);
"%d length"
,
i
+
1
);
...
@@ -580,7 +581,8 @@ int vp8_decode_frame(VP8D_COMP *pbi)
...
@@ -580,7 +581,8 @@ int vp8_decode_frame(VP8D_COMP *pbi)
(
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
))
>>
5
;
(
data
[
0
]
|
(
data
[
1
]
<<
8
)
|
(
data
[
2
]
<<
16
))
>>
5
;
data
+=
3
;
data
+=
3
;
if
(
data_end
-
data
<
first_partition_length_in_bytes
)
if
(
data
+
first_partition_length_in_bytes
>
data_end
||
data
+
first_partition_length_in_bytes
<
data
)
vpx_internal_error
(
&
pc
->
error
,
VPX_CODEC_CORRUPT_FRAME
,
vpx_internal_error
(
&
pc
->
error
,
VPX_CODEC_CORRUPT_FRAME
,
"Truncated packet or corrupt partition 0 length"
);
"Truncated packet or corrupt partition 0 length"
);
vp8_setup_version
(
pc
);
vp8_setup_version
(
pc
);
...
...
This diff is collapsed.
Click to expand it.
vp8/vp8_dx_iface.c
+
8
−
2
View file @
4d1b0d2a
...
@@ -253,8 +253,11 @@ static vpx_codec_err_t vp8_peek_si(const uint8_t *data,
...
@@ -253,8 +253,11 @@ static vpx_codec_err_t vp8_peek_si(const uint8_t *data,
unsigned
int
data_sz
,
unsigned
int
data_sz
,
vpx_codec_stream_info_t
*
si
)
vpx_codec_stream_info_t
*
si
)
{
{
vpx_codec_err_t
res
=
VPX_CODEC_OK
;
vpx_codec_err_t
res
=
VPX_CODEC_OK
;
if
(
data
+
data_sz
<=
data
)
res
=
VPX_CODEC_INVALID_PARAM
;
else
{
{
/* Parse uncompresssed part of key frame header.
/* Parse uncompresssed part of key frame header.
* 3 bytes:- including version, frame type and an offset
* 3 bytes:- including version, frame type and an offset
...
@@ -331,7 +334,10 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
...
@@ -331,7 +334,10 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
ctx
->
img_avail
=
0
;
ctx
->
img_avail
=
0
;
/* Determine the stream parameters */
/* Determine the stream parameters. Note that we rely on peek_si to
* validate that we have a buffer that does not wrap around the top
* of the heap.
*/
if
(
!
ctx
->
si
.
h
)
if
(
!
ctx
->
si
.
h
)
res
=
ctx
->
base
.
iface
->
dec
.
peek_si
(
data
,
data_sz
,
&
ctx
->
si
);
res
=
ctx
->
base
.
iface
->
dec
.
peek_si
(
data
,
data_sz
,
&
ctx
->
si
);
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets