mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Don't use initialized memory. Patch by Sebastian Reitenbach
<sebastia@l00-bugdead-prods.de>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26577 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2b02c9fd5d
commit
6b0246aa65
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-05-27 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/xlib/GSXftFontInfo.m (-coveredCharacterSet): Moved the
|
||||
swapping into the loop, where the actual data is available.
|
||||
Patch by Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>.
|
||||
|
||||
2008-05-25 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.ac: Fail if libXext or libXt not found when building
|
||||
|
|
|
@ -325,7 +325,8 @@ Ones(unsigned int n)
|
|||
FcChar32 ucs4;
|
||||
FcChar32 map[FC_CHARSET_MAP_SIZE];
|
||||
FcChar32 next;
|
||||
|
||||
BOOL swap = NSHostByteOrder() == NS_BigEndian;
|
||||
|
||||
if (!d)
|
||||
return nil;
|
||||
|
||||
|
@ -342,15 +343,15 @@ Ones(unsigned int n)
|
|||
// Round up to a suitable plane size
|
||||
max = ((max + 8191) >> 13) << 13;
|
||||
[d setLength: max];
|
||||
// Do some byte swapping, if needed.
|
||||
if (NSHostByteOrder() == NS_BigEndian)
|
||||
{
|
||||
map[i] = NSSwapInt(map[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < FC_CHARSET_MAP_SIZE; i++)
|
||||
if (map[i])
|
||||
{
|
||||
// Do some byte swapping, if needed.
|
||||
if (swap)
|
||||
{
|
||||
map[i] = NSSwapInt(map[i]);
|
||||
}
|
||||
count += Ones(map[i]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue