mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix memory allocation bug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13656 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2aa83cb913
commit
1f5ed975ec
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-05-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Unicode.m: GSFromUnicode(), GSToUnicode(), bugfix - ensure
|
||||
that returned memory is allocated from specified zone, rather than
|
||||
returning internal buffer.
|
||||
|
||||
2002-05-13 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSFileManager.m: Don't try to release memory using free()
|
||||
|
|
|
@ -925,7 +925,7 @@ tables:
|
|||
}
|
||||
ptr = r;
|
||||
}
|
||||
else if (zone != 0 && bsize > dpos)
|
||||
else if (zone != 0 && (ptr == buf || bsize > dpos))
|
||||
{
|
||||
unsigned bytes = dpos * sizeof(unichar) + extra;
|
||||
|
||||
|
@ -1462,7 +1462,7 @@ tables:
|
|||
}
|
||||
ptr = r;
|
||||
}
|
||||
else if (zone != 0 && bsize > dpos)
|
||||
else if (zone != 0 && (ptr == buf || bsize > dpos))
|
||||
{
|
||||
unsigned bytes = dpos + extra;
|
||||
|
||||
|
|
Loading…
Reference in a new issue