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
76702f33
Commit
76702f33
authored
Oct 16, 2011
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Fixed some oom handling (Coverity).
parent
118dc199
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
usp10.c
dlls/usp10/usp10.c
+22
-0
No files found.
dlls/usp10/usp10.c
View file @
76702f33
...
...
@@ -1029,6 +1029,8 @@ static BOOL requires_fallback(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa,
return
TRUE
;
glyphs
=
heap_alloc
(
sizeof
(
WORD
)
*
cChars
);
if
(
!
glyphs
)
return
FALSE
;
if
(
ScriptGetCMap
(
hdc
,
psc
,
pwcInChars
,
cChars
,
0
,
glyphs
)
!=
S_OK
)
{
heap_free
(
glyphs
);
...
...
@@ -1111,6 +1113,11 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
if
(
dwFlags
&
SSA_PASSWORD
)
{
iString
=
heap_alloc
(
sizeof
(
WCHAR
)
*
cString
);
if
(
!
iString
)
{
hr
=
E_OUTOFMEMORY
;
goto
error
;
}
for
(
i
=
0
;
i
<
cString
;
i
++
)
iString
[
i
]
=
*
((
const
WCHAR
*
)
pString
);
pString
=
iString
;
...
...
@@ -1133,6 +1140,9 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
}
if
(
hr
!=
S_OK
)
goto
error
;
/* set back to out of memory for default goto error behaviour */
hr
=
E_OUTOFMEMORY
;
if
(
dwFlags
&
SSA_BREAK
)
{
if
((
analysis
->
logattrs
=
heap_alloc
(
sizeof
(
SCRIPT_LOGATTR
)
*
cString
)))
...
...
@@ -1173,6 +1183,18 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
const
WCHAR
*
pStr
=
(
const
WCHAR
*
)
pString
;
analysis
->
glyphs
[
i
].
fallbackFont
=
NULL
;
if
(
!
glyphs
||
!
pwLogClust
||
!
piAdvance
||
!
psva
||
!
pGoffset
||
!
abc
)
{
heap_free
(
glyphs
);
heap_free
(
pwLogClust
);
heap_free
(
piAdvance
);
heap_free
(
psva
);
heap_free
(
pGoffset
);
heap_free
(
abc
);
hr
=
E_OUTOFMEMORY
;
goto
error
;
}
if
((
dwFlags
&
SSA_FALLBACK
)
&&
requires_fallback
(
hdc
,
sc
,
&
analysis
->
pItem
[
i
].
a
,
&
pStr
[
analysis
->
pItem
[
i
].
iCharPos
],
cChar
))
{
LOGFONTW
lf
;
...
...
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