Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
e00360d9
Commit
e00360d9
authored
Apr 06, 2006
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/codec/png.c: More robust error checking, avoid calling abort() in
case of an invalid file.
parent
ebeb35dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
modules/codec/png.c
modules/codec/png.c
+23
-0
No files found.
modules/codec/png.c
View file @
e00360d9
...
...
@@ -137,9 +137,32 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_sys
->
b_error
=
VLC_FALSE
;
p_png
=
png_create_read_struct
(
PNG_LIBPNG_VER_STRING
,
0
,
0
,
0
);
if
(
p_png
==
NULL
)
{
block_Release
(
p_block
);
*
pp_block
=
NULL
;
return
NULL
;
}
p_info
=
png_create_info_struct
(
p_png
);
if
(
p_info
==
NULL
)
{
png_destroy_read_struct
(
&
p_png
,
png_infopp_NULL
,
png_infopp_NULL
);
block_Release
(
p_block
);
*
pp_block
=
NULL
;
return
NULL
;
}
p_end_info
=
png_create_info_struct
(
p_png
);
if
(
p_end_info
==
NULL
)
{
png_destroy_read_struct
(
&
p_png
,
&
p_info
,
png_infopp_NULL
);
block_Release
(
p_block
);
*
pp_block
=
NULL
;
return
NULL
;
}
/* libpng longjmp's there in case of error */
if
(
setjmp
(
png_jmpbuf
(
p_png
)
)
)
goto
error
;
png_set_read_fn
(
p_png
,
(
void
*
)
p_block
,
user_read
);
png_set_error_fn
(
p_png
,
(
void
*
)
p_dec
,
user_error
,
user_warning
);
...
...
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