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
e1065924
Commit
e1065924
authored
Feb 14, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtrle: add more checks against pixel_ptr being negative.
CC:libav-stable@libav.org
parent
4f3b058c
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 @
e1065924
...
...
@@ -117,6 +117,7 @@ static inline void qtrle_decode_2n4bpp(QtrleContext *s, int row_ptr,
while
(
lines_to_change
--
)
{
pixel_ptr
=
row_ptr
+
(
num_pixels
*
(
bytestream2_get_byte
(
&
s
->
g
)
-
1
));
CHECK_PIXEL_PTR
(
0
);
while
((
rle_code
=
(
signed
char
)
bytestream2_get_byte
(
&
s
->
g
))
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -171,6 +172,7 @@ static void qtrle_decode_8bpp(QtrleContext *s, int row_ptr, int lines_to_change)
while
(
lines_to_change
--
)
{
pixel_ptr
=
row_ptr
+
(
4
*
(
bytestream2_get_byte
(
&
s
->
g
)
-
1
));
CHECK_PIXEL_PTR
(
0
);
while
((
rle_code
=
(
signed
char
)
bytestream2_get_byte
(
&
s
->
g
))
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -220,6 +222,7 @@ static void qtrle_decode_16bpp(QtrleContext *s, int row_ptr, int lines_to_change
while
(
lines_to_change
--
)
{
pixel_ptr
=
row_ptr
+
(
bytestream2_get_byte
(
&
s
->
g
)
-
1
)
*
2
;
CHECK_PIXEL_PTR
(
0
);
while
((
rle_code
=
(
signed
char
)
bytestream2_get_byte
(
&
s
->
g
))
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -263,6 +266,7 @@ static void qtrle_decode_24bpp(QtrleContext *s, int row_ptr, int lines_to_change
while
(
lines_to_change
--
)
{
pixel_ptr
=
row_ptr
+
(
bytestream2_get_byte
(
&
s
->
g
)
-
1
)
*
3
;
CHECK_PIXEL_PTR
(
0
);
while
((
rle_code
=
(
signed
char
)
bytestream2_get_byte
(
&
s
->
g
))
!=
-
1
)
{
if
(
rle_code
==
0
)
{
...
...
@@ -309,6 +313,7 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change
while
(
lines_to_change
--
)
{
pixel_ptr
=
row_ptr
+
(
bytestream2_get_byte
(
&
s
->
g
)
-
1
)
*
4
;
CHECK_PIXEL_PTR
(
0
);
while
((
rle_code
=
(
signed
char
)
bytestream2_get_byte
(
&
s
->
g
))
!=
-
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