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
6d45702f
Commit
6d45702f
authored
Oct 08, 2011
by
Laurent Aimar
Committed by
Michael Niedermayer
Oct 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vqavideo: check for out of bound reads.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e3123856
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vqavideo.c
libavcodec/vqavideo.c
+6
-0
No files found.
libavcodec/vqavideo.c
View file @
6d45702f
...
@@ -230,6 +230,8 @@ static void decode_format80(const unsigned char *src, int src_size,
...
@@ -230,6 +230,8 @@ static void decode_format80(const unsigned char *src, int src_size,
src_index
+=
2
;
src_index
+=
2
;
av_dlog
(
NULL
,
"(1) copy %X bytes from absolute pos %X
\n
"
,
count
,
src_pos
);
av_dlog
(
NULL
,
"(1) copy %X bytes from absolute pos %X
\n
"
,
count
,
src_pos
);
CHECK_COUNT
();
CHECK_COUNT
();
if
(
src_pos
+
count
>
dest_size
)
return
;
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
dest
[
dest_index
+
i
]
=
dest
[
src_pos
+
i
];
dest
[
dest_index
+
i
]
=
dest
[
src_pos
+
i
];
dest_index
+=
count
;
dest_index
+=
count
;
...
@@ -252,6 +254,8 @@ static void decode_format80(const unsigned char *src, int src_size,
...
@@ -252,6 +254,8 @@ static void decode_format80(const unsigned char *src, int src_size,
src_index
+=
2
;
src_index
+=
2
;
av_dlog
(
NULL
,
"(3) copy %X bytes from absolute pos %X
\n
"
,
count
,
src_pos
);
av_dlog
(
NULL
,
"(3) copy %X bytes from absolute pos %X
\n
"
,
count
,
src_pos
);
CHECK_COUNT
();
CHECK_COUNT
();
if
(
src_pos
+
count
>
dest_size
)
return
;
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
dest
[
dest_index
+
i
]
=
dest
[
src_pos
+
i
];
dest
[
dest_index
+
i
]
=
dest
[
src_pos
+
i
];
dest_index
+=
count
;
dest_index
+=
count
;
...
@@ -272,6 +276,8 @@ static void decode_format80(const unsigned char *src, int src_size,
...
@@ -272,6 +276,8 @@ static void decode_format80(const unsigned char *src, int src_size,
src_index
+=
2
;
src_index
+=
2
;
av_dlog
(
NULL
,
"(5) copy %X bytes from relpos %X
\n
"
,
count
,
src_pos
);
av_dlog
(
NULL
,
"(5) copy %X bytes from relpos %X
\n
"
,
count
,
src_pos
);
CHECK_COUNT
();
CHECK_COUNT
();
if
(
dest_index
<
src_pos
)
return
;
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
dest
[
dest_index
+
i
]
=
dest
[
dest_index
-
src_pos
+
i
];
dest
[
dest_index
+
i
]
=
dest
[
dest_index
-
src_pos
+
i
];
dest_index
+=
count
;
dest_index
+=
count
;
...
...
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