summaryrefslogtreecommitdiff
path: root/freetype/src/psaux/psarrst.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2021-12-07 11:20:37 +0000
committerChris Liddell <chris.liddell@artifex.com>2021-12-07 12:13:37 +0000
commitb20b66200381b4e348931b97187ef7b93ab4e655 (patch)
tree1ab0ebf6ee1eff60a455edb98acddef5a0639025 /freetype/src/psaux/psarrst.c
parent6f29f18171aaf772fbfe6d6ea5b7d40acbd89a0f (diff)
downloadghostpdl-b20b66200381b4e348931b97187ef7b93ab4e655.tar.gz
Update freetype to 2.11.1
Diffstat (limited to 'freetype/src/psaux/psarrst.c')
-rw-r--r--freetype/src/psaux/psarrst.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/freetype/src/psaux/psarrst.c b/freetype/src/psaux/psarrst.c
index 8751d275f..70313d283 100644
--- a/freetype/src/psaux/psarrst.c
+++ b/freetype/src/psaux/psarrst.c
@@ -65,7 +65,6 @@
arrstack->error = error;
arrstack->sizeItem = sizeItem;
arrstack->allocated = 0;
- arrstack->chunk = 10; /* chunks of 10 items */
arrstack->count = 0;
arrstack->totalSize = 0;
arrstack->ptr = NULL;
@@ -110,7 +109,7 @@
FT_ASSERT( newSize > 0 ); /* avoid realloc with zero size */
- if ( !FT_REALLOC( arrstack->ptr, arrstack->totalSize, newSize ) )
+ if ( !FT_QREALLOC( arrstack->ptr, arrstack->totalSize, newSize ) )
{
arrstack->allocated = numElements;
arrstack->totalSize = newSize;
@@ -216,9 +215,9 @@
if ( arrstack->count == arrstack->allocated )
{
- /* grow the buffer by one chunk */
+ /* increase the buffer size */
if ( !cf2_arrstack_setNumElements(
- arrstack, arrstack->allocated + arrstack->chunk ) )
+ arrstack, arrstack->allocated * 2 + 16 ) )
{
/* on error, ignore the push */
return;