Author: hbelusca
Date: Tue Mar 25 19:49:35 2014
New Revision: 62563
URL:
http://svn.reactos.org/svn/reactos?rev=62563&view=rev
Log:
[USP10]: Wine sync.
SHA-1: 8fb52c7c5d711918fadf2590061d668093d14708
* usp10: Avoid non-standard array initialization.
Fix this bug introduced in revision 62535.
CORE-8029 #resolve #comment Fixed in revision 62563.
Modified:
trunk/reactos/dll/win32/usp10/bidi.c
Modified: trunk/reactos/dll/win32/usp10/bidi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/bidi.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/usp10/bidi.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/usp10/bidi.c [iso-8859-1] Tue Mar 25 19:49:35 2014
@@ -819,9 +819,12 @@
static void computeIsolatingRunsSet(unsigned baselevel, WORD *pcls, WORD *pLevel, int
uCount, struct list *set)
{
int run_start, run_end, i;
- Run runs[uCount];
int run_count = 0;
+ Run *runs;
IsolatedRun *current_isolated;
+
+ runs = HeapAlloc(GetProcessHeap(), 0, uCount * sizeof(Run));
+ if (!runs) return;
list_init(set);
@@ -849,6 +852,7 @@
int type_fence, real_end;
int j;
current_isolated = HeapAlloc(GetProcessHeap(), 0, sizeof(IsolatedRun) +
sizeof(WORD*)*uCount);
+ if (!current_isolated) break;
run_start = runs[k].start;
current_isolated->e = runs[k].e;
@@ -936,6 +940,8 @@
}
i++;
}
+
+ HeapFree(GetProcessHeap(), 0, runs);
}
/*************************************************************