([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:
Andrew McCallum 1995-07-06 17:56:12 +00:00
parent a8eb4ec123
commit 8d05c2ef5b

View file

@ -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);