Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9a0a64cb
Commit
9a0a64cb
authored
Sep 17, 2011
by
Laurent Aimar
Committed by
Michael Niedermayer
Sep 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential overreads in rv34 decoder.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bfadca1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
rv34.c
libavcodec/rv34.c
+3
-2
No files found.
libavcodec/rv34.c
View file @
9a0a64cb
...
@@ -1483,6 +1483,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
...
@@ -1483,6 +1483,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
slice_count
=
(
*
buf
++
)
+
1
;
slice_count
=
(
*
buf
++
)
+
1
;
slices_hdr
=
buf
+
4
;
slices_hdr
=
buf
+
4
;
buf
+=
8
*
slice_count
;
buf
+=
8
*
slice_count
;
buf_size
-=
1
+
8
*
slice_count
;
}
else
}
else
slice_count
=
avctx
->
slice_count
;
slice_count
=
avctx
->
slice_count
;
...
@@ -1501,7 +1502,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
...
@@ -1501,7 +1502,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
si
.
type
==
AV_PICTURE_TYPE_B
)
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
si
.
type
==
AV_PICTURE_TYPE_B
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
si
.
type
!=
AV_PICTURE_TYPE_I
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
si
.
type
!=
AV_PICTURE_TYPE_I
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
return
buf_
size
;
return
avpkt
->
size
;
for
(
i
=
0
;
i
<
slice_count
;
i
++
){
for
(
i
=
0
;
i
<
slice_count
;
i
++
){
int
offset
=
get_slice_offset
(
avctx
,
slices_hdr
,
i
);
int
offset
=
get_slice_offset
(
avctx
,
slices_hdr
,
i
);
...
@@ -1550,7 +1551,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
...
@@ -1550,7 +1551,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
}
}
s
->
current_picture_ptr
=
NULL
;
//so we can detect if frame_end wasnt called (find some nicer solution...)
s
->
current_picture_ptr
=
NULL
;
//so we can detect if frame_end wasnt called (find some nicer solution...)
}
}
return
buf_
size
;
return
avpkt
->
size
;
}
}
av_cold
int
ff_rv34_decode_end
(
AVCodecContext
*
avctx
)
av_cold
int
ff_rv34_decode_end
(
AVCodecContext
*
avctx
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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