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
7fb92be7
Commit
7fb92be7
authored
Oct 08, 2011
by
Laurent Aimar
Committed by
Michael Niedermayer
Oct 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtrle: check for out of bound writes.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a68a6a4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
qtrle.c
libavcodec/qtrle.c
+5
-0
No files found.
libavcodec/qtrle.c
View file @
7fb92be7
...
...
@@ -127,6 +127,7 @@ static inline void qtrle_decode_2n4bpp(QtrleContext *s, int stream_ptr,
while
(
lines_to_change
--
)
{
CHECK_STREAM_PTR
(
2
);
pixel_ptr
=
row_ptr
+
(
num_pixels
*
(
s
->
buf
[
stream_ptr
++
]
-
1
));
CHECK_PIXEL_PTR
(
0
);
/* make sure pixel_ptr is positive */
while
((
rle_code
=
(
signed
char
)
s
->
buf
[
stream_ptr
++
])
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -183,6 +184,7 @@ static void qtrle_decode_8bpp(QtrleContext *s, int stream_ptr, int row_ptr, int
while
(
lines_to_change
--
)
{
CHECK_STREAM_PTR
(
2
);
pixel_ptr
=
row_ptr
+
(
4
*
(
s
->
buf
[
stream_ptr
++
]
-
1
));
CHECK_PIXEL_PTR
(
0
);
/* make sure pixel_ptr is positive */
while
((
rle_code
=
(
signed
char
)
s
->
buf
[
stream_ptr
++
])
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -236,6 +238,7 @@ static void qtrle_decode_16bpp(QtrleContext *s, int stream_ptr, int row_ptr, int
while
(
lines_to_change
--
)
{
CHECK_STREAM_PTR
(
2
);
pixel_ptr
=
row_ptr
+
(
s
->
buf
[
stream_ptr
++
]
-
1
)
*
2
;
CHECK_PIXEL_PTR
(
0
);
/* make sure pixel_ptr is positive */
while
((
rle_code
=
(
signed
char
)
s
->
buf
[
stream_ptr
++
])
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -285,6 +288,7 @@ static void qtrle_decode_24bpp(QtrleContext *s, int stream_ptr, int row_ptr, int
while
(
lines_to_change
--
)
{
CHECK_STREAM_PTR
(
2
);
pixel_ptr
=
row_ptr
+
(
s
->
buf
[
stream_ptr
++
]
-
1
)
*
3
;
CHECK_PIXEL_PTR
(
0
);
/* make sure pixel_ptr is positive */
while
((
rle_code
=
(
signed
char
)
s
->
buf
[
stream_ptr
++
])
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -336,6 +340,7 @@ static void qtrle_decode_32bpp(QtrleContext *s, int stream_ptr, int row_ptr, int
while
(
lines_to_change
--
)
{
CHECK_STREAM_PTR
(
2
);
pixel_ptr
=
row_ptr
+
(
s
->
buf
[
stream_ptr
++
]
-
1
)
*
4
;
CHECK_PIXEL_PTR
(
0
);
/* make sure pixel_ptr is positive */
while
((
rle_code
=
(
signed
char
)
s
->
buf
[
stream_ptr
++
])
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
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