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
7ca603f9
Commit
7ca603f9
authored
May 31, 2015
by
Vittorio Giovara
Committed by
Luca Barbato
May 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jpegls: Check memory allocation
parent
7d2a6826
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
jpeglsdec.c
libavcodec/jpeglsdec.c
+6
-0
No files found.
libavcodec/jpeglsdec.c
View file @
7ca603f9
...
...
@@ -278,10 +278,16 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
int
off
=
0
,
stride
=
1
,
width
,
shift
,
ret
=
0
;
zero
=
av_mallocz
(
s
->
picture_ptr
->
linesize
[
0
]);
if
(
!
zero
)
return
AVERROR
(
ENOMEM
);
last
=
zero
;
cur
=
s
->
picture_ptr
->
data
[
0
];
state
=
av_mallocz
(
sizeof
(
JLSState
));
if
(
!
state
)
{
av_free
(
zero
);
return
AVERROR
(
ENOMEM
);
}
/* initialize JPEG-LS state from JPEG parameters */
state
->
near
=
near
;
state
->
bpp
=
(
s
->
bits
<
2
)
?
2
:
s
->
bits
;
...
...
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