mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 04:11:28 +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>
|
2008-05-25 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* configure.ac: Fail if libXext or libXt not found when building
|
* configure.ac: Fail if libXext or libXt not found when building
|
||||||
|
|
|
@ -325,6 +325,7 @@ Ones(unsigned int n)
|
||||||
FcChar32 ucs4;
|
FcChar32 ucs4;
|
||||||
FcChar32 map[FC_CHARSET_MAP_SIZE];
|
FcChar32 map[FC_CHARSET_MAP_SIZE];
|
||||||
FcChar32 next;
|
FcChar32 next;
|
||||||
|
BOOL swap = NSHostByteOrder() == NS_BigEndian;
|
||||||
|
|
||||||
if (!d)
|
if (!d)
|
||||||
return nil;
|
return nil;
|
||||||
|
@ -342,15 +343,15 @@ Ones(unsigned int n)
|
||||||
// Round up to a suitable plane size
|
// Round up to a suitable plane size
|
||||||
max = ((max + 8191) >> 13) << 13;
|
max = ((max + 8191) >> 13) << 13;
|
||||||
[d setLength: max];
|
[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++)
|
for (i = 0; i < FC_CHARSET_MAP_SIZE; i++)
|
||||||
if (map[i])
|
if (map[i])
|
||||||
{
|
{
|
||||||
|
// Do some byte swapping, if needed.
|
||||||
|
if (swap)
|
||||||
|
{
|
||||||
|
map[i] = NSSwapInt(map[i]);
|
||||||
|
}
|
||||||
count += Ones(map[i]);
|
count += Ones(map[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue