Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gtk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
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
Dorota Czaplejewicz
gtk
Commits
868c9a85
Commit
868c9a85
authored
Nov 15, 2005
by
Matthias Clasen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix integer overflows in the xpm loader
parent
f3f1bdc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
gdk-pixbuf/ChangeLog
gdk-pixbuf/ChangeLog
+5
-0
gdk-pixbuf/io-xpm.c
gdk-pixbuf/io-xpm.c
+5
-2
No files found.
gdk-pixbuf/ChangeLog
View file @
868c9a85
2005
-
11
-
15
Matthias
Clasen
<
mclasen
@
redhat
.
com
>
*
io
-
xpm
.
c
:
Fix
several
integer
overflows
which
have
been
reported
as
CVE
-
2005
-
3186
and
CVE
-
2005
-
2975.
2005
-
10
-
12
Matthias
Clasen
<
mclasen
@
redhat
.
com
>
*
gdk
-
pixbuf
-
loader
.
c
(
gdk_pixbuf_loader_write
):
Only
call
...
...
gdk-pixbuf/io-xpm.c
View file @
868c9a85
...
...
@@ -405,7 +405,8 @@ file_buffer (enum buf_op op, gpointer handle)
/* Fall through to the xpm_read_string. */
case
op_body
:
xpm_read_string
(
h
->
infile
,
&
h
->
buffer
,
&
h
->
buffer_size
);
if
(
!
xpm_read_string
(
h
->
infile
,
&
h
->
buffer
,
&
h
->
buffer_size
))
return
NULL
;
return
h
->
buffer
;
default:
...
...
@@ -500,7 +501,9 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
_
(
"XPM has invalid number of chars per pixel"
));
return
NULL
;
}
if
(
n_col
<=
0
||
n_col
>=
G_MAXINT
/
(
cpp
+
1
))
{
if
(
n_col
<=
0
||
n_col
>=
G_MAXINT
/
(
cpp
+
1
)
||
n_col
>=
G_MAXINT
/
sizeof
(
XPMColor
))
{
g_set_error
(
error
,
GDK_PIXBUF_ERROR
,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE
,
...
...
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