Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ff3d728d
Commit
ff3d728d
authored
Mar 25, 2014
by
Thomas Faber
Committed by
Alexandre Julliard
Mar 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Avoid variable-length arrays.
parent
20dcd96d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
bidi.c
dlls/gdi32/bidi.c
+21
-2
No files found.
dlls/gdi32/bidi.c
View file @
ff3d728d
...
...
@@ -596,10 +596,25 @@ BOOL BIDI_Reorder(
if
(
lpGlyphs
&&
doGlyphs
)
{
BYTE
runOrder
[
maxItems
]
;
int
visOrder
[
maxItems
]
;
BYTE
*
runOrder
;
int
*
visOrder
;
SCRIPT_ITEM
*
curItem
;
runOrder
=
HeapAlloc
(
GetProcessHeap
(),
0
,
maxItems
*
sizeof
(
*
runOrder
));
visOrder
=
HeapAlloc
(
GetProcessHeap
(),
0
,
maxItems
*
sizeof
(
*
visOrder
));
if
(
!
runOrder
||
!
visOrder
)
{
WARN
(
"Out of memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
runOrder
);
HeapFree
(
GetProcessHeap
(),
0
,
visOrder
);
HeapFree
(
GetProcessHeap
(),
0
,
chartype
);
HeapFree
(
GetProcessHeap
(),
0
,
levels
);
HeapFree
(
GetProcessHeap
(),
0
,
pItems
);
HeapFree
(
GetProcessHeap
(),
0
,
psva
);
HeapFree
(
GetProcessHeap
(),
0
,
pwLogClust
);
return
FALSE
;
}
for
(
j
=
0
;
j
<
nItems
;
j
++
)
runOrder
[
j
]
=
pItems
[
j
].
a
.
s
.
uBidiLevel
;
...
...
@@ -621,6 +636,8 @@ BOOL BIDI_Reorder(
if
(
!
run_glyphs
)
{
WARN
(
"Out of memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
runOrder
);
HeapFree
(
GetProcessHeap
(),
0
,
visOrder
);
HeapFree
(
GetProcessHeap
(),
0
,
chartype
);
HeapFree
(
GetProcessHeap
(),
0
,
levels
);
HeapFree
(
GetProcessHeap
(),
0
,
pItems
);
...
...
@@ -655,6 +672,8 @@ BOOL BIDI_Reorder(
glyph_i
+=
cOutGlyphs
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
runOrder
);
HeapFree
(
GetProcessHeap
(),
0
,
visOrder
);
}
done
+=
i
;
...
...
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