Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
GIMP
Commits
657a754f
Commit
657a754f
authored
Nov 01, 2017
by
Massimo Valentini
Committed by
Jehan
Dec 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 789610: invalid gbr brush crashing GIMP
parent
877e79b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
app/core/gimpbrush-load.c
app/core/gimpbrush-load.c
+7
-1
plug-ins/common/file-gbr.c
plug-ins/common/file-gbr.c
+6
-0
No files found.
app/core/gimpbrush-load.c
View file @
657a754f
...
...
@@ -135,7 +135,7 @@ gimp_brush_load_brush (GimpContext *context,
GError
**
error
)
{
GimpBrush
*
brush
;
g
int
bn_size
;
g
size
bn_size
;
BrushHeader
header
;
gchar
*
name
=
NULL
;
guchar
*
pixmap
;
...
...
@@ -226,6 +226,12 @@ gimp_brush_load_brush (GimpContext *context,
return
NULL
;
}
if
(
header
.
header_size
<
sizeof
(
BrushHeader
))
{
g_message
(
_
(
"Unsupported brush format"
));
return
NULL
;
}
/* Read in the brush name */
if
((
bn_size
=
(
header
.
header_size
-
sizeof
(
header
))))
{
...
...
plug-ins/common/file-gbr.c
View file @
657a754f
...
...
@@ -406,6 +406,12 @@ load_image (GFile *file,
/* Version 1 didn't have a magic number and had no spacing */
bh
.
spacing
=
25
;
bh
.
header_size
+=
8
;
if
(
bh
.
header_size
<
sizeof
(
BrushHeader
))
{
g_message
(
_
(
"Unsupported brush format"
));
g_object_unref
(
input
);
return
-
1
;
}
break
;
case
2
:
...
...
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