Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GIMP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2,643
Issues
2,643
List
Boards
Labels
Service Desk
Milestones
Merge Requests
36
Merge Requests
36
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
GIMP
Commits
153ae579
Commit
153ae579
authored
Nov 16, 2009
by
Nils Philippsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure valid bit depths when reading BMP files.
(cherry picked from commit
16e6a376
)
parent
6e8ff603
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
plug-ins/file-bmp/bmp-read.c
plug-ins/file-bmp/bmp-read.c
+18
-1
No files found.
plug-ins/file-bmp/bmp-read.c
View file @
153ae579
...
...
@@ -400,9 +400,26 @@ ReadBMP (const gchar *name,
}
}
/* Valid bit
pdepth
is 1, 4, 8, 16, 24, 32 */
/* Valid bit
depth
is 1, 4, 8, 16, 24, 32 */
/* 16 is awful, we should probably shoot whoever invented it */
switch
(
Bitmap_Head
.
biBitCnt
)
{
case
1
:
case
2
:
case
4
:
case
8
:
case
16
:
case
24
:
case
32
:
break
;
default:
g_set_error
(
error
,
G_FILE_ERROR
,
G_FILE_ERROR_FAILED
,
_
(
"'%s' is not a valid BMP file"
),
gimp_filename_to_utf8
(
filename
));
return
-
1
;
}
/* There should be some colors used! */
ColormapSize
=
...
...
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