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
282bb028
Commit
282bb028
authored
Dec 24, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
j2kdec: Fix crash in get_qcx
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3eedf9f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
j2kdec.c
libavcodec/j2kdec.c
+2
-2
No files found.
libavcodec/j2kdec.c
View file @
282bb028
...
@@ -365,7 +365,7 @@ static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q)
...
@@ -365,7 +365,7 @@ static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q)
if
(
q
->
quantsty
==
J2K_QSTY_NONE
){
if
(
q
->
quantsty
==
J2K_QSTY_NONE
){
n
-=
3
;
n
-=
3
;
if
(
s
->
buf_end
-
s
->
buf
<
n
)
if
(
s
->
buf_end
-
s
->
buf
<
n
||
32
*
3
<
n
)
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
for
(
i
=
0
;
i
<
n
;
i
++
)
for
(
i
=
0
;
i
<
n
;
i
++
)
q
->
expn
[
i
]
=
bytestream_get_byte
(
&
s
->
buf
)
>>
3
;
q
->
expn
[
i
]
=
bytestream_get_byte
(
&
s
->
buf
)
>>
3
;
...
@@ -382,7 +382,7 @@ static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q)
...
@@ -382,7 +382,7 @@ static int get_qcx(J2kDecoderContext *s, int n, J2kQuantStyle *q)
}
}
}
else
{
}
else
{
n
=
(
n
-
3
)
>>
1
;
n
=
(
n
-
3
)
>>
1
;
if
(
s
->
buf_end
-
s
->
buf
<
n
)
if
(
s
->
buf_end
-
s
->
buf
<
n
||
32
*
3
<
n
)
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
for
(
i
=
0
;
i
<
n
;
i
++
){
for
(
i
=
0
;
i
<
n
;
i
++
){
x
=
bytestream_get_be16
(
&
s
->
buf
);
x
=
bytestream_get_be16
(
&
s
->
buf
);
...
...
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