mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
([MemoryStream -writeBytes:length:]): Realloc buffer to at least
minimum required length. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@496 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a8eb4ec123
commit
8d05c2ef5b
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ static BOOL debug_memory_stream = YES;
|
|||
{
|
||||
if (prefix+position+l > size)
|
||||
{
|
||||
size *= 2;
|
||||
size = MAX(prefix+position+l, size*2);
|
||||
buffer = (*objc_realloc)(buffer, size);
|
||||
}
|
||||
memcpy(buffer+prefix+position, b, l);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue