Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
62b9c26b
Commit
62b9c26b
authored
Apr 02, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Refuse to load a large .fot file earlier.
parent
b2af5195
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
font.c
dlls/gdi32/font.c
+7
-3
No files found.
dlls/gdi32/font.c
View file @
62b9c26b
...
...
@@ -3454,10 +3454,15 @@ static void *map_file( const WCHAR *filename, LARGE_INTEGER *size )
file
=
CreateFileW
(
filename
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
NULL
;
GetFileSizeEx
(
file
,
size
);
if
(
!
GetFileSizeEx
(
file
,
size
)
||
size
->
u
.
HighPart
)
{
CloseHandle
(
file
);
return
NULL
;
}
mapping
=
CreateFileMappingW
(
file
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
);
CloseHandle
(
file
);
if
(
mapping
==
NULL
)
return
NULL
;
if
(
!
mapping
)
return
NULL
;
ptr
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
CloseHandle
(
mapping
);
...
...
@@ -3478,7 +3483,6 @@ static WCHAR *get_scalable_filename( const WCHAR *res )
if
(
!
ptr
)
return
NULL
;
if
(
size
.
u
.
HighPart
)
goto
fail
;
if
(
size
.
u
.
LowPart
<
sizeof
(
*
dos
))
goto
fail
;
dos
=
(
const
IMAGE_DOS_HEADER
*
)
ptr
;
if
(
dos
->
e_magic
!=
IMAGE_DOS_SIGNATURE
)
goto
fail
;
...
...
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