summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-07-31 18:05:40 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-07-31 18:05:40 +0200
commit8af14024c2134da5042fbafa01e70b6e0b338cd7 (patch)
tree00fe85e611ca8d6fb118990057c34b21c3317c72
parentef439abd46aa14eb7d0e2ef3f4bd552ce8c3f6ee (diff)
downloadphp-git-8af14024c2134da5042fbafa01e70b6e0b338cd7.tar.gz
Fix 78213: Empty row pocket
We have to ensure that we don't create an arena which is smaller than its header, regardless of the configured alignment.
-rw-r--r--NEWS3
-rw-r--r--ext/mysqlnd/mysqlnd_block_alloc.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 6e6407aed6..db44d9b535 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,9 @@ PHP NEWS
- LiteSpeed:
. Updated to LiteSpeed SAPI V7.5 (Fixed clean shutdown). (George Wang)
+- MySQLnd:
+ . Fixed bug #78213 (Empty row pocket). (cmb)
+
- Standard:
. Fixed bug #69100 (Bus error from stream_copy_to_stream (file -> SSL stream)
with invalid length). (Nikita)
diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c
index e1d3f846ec..10f6bd3b6d 100644
--- a/ext/mysqlnd/mysqlnd_block_alloc.c
+++ b/ext/mysqlnd/mysqlnd_block_alloc.c
@@ -161,7 +161,7 @@ mysqlnd_mempool_create(size_t arena_size)
MYSQLND_MEMORY_POOL * ret;
DBG_ENTER("mysqlnd_mempool_create");
- arena = mysqlnd_arena_create(MAX(arena_size, sizeof(zend_arena)));
+ arena = mysqlnd_arena_create(MAX(arena_size, ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))));
ret = mysqlnd_arena_alloc(&arena, sizeof(MYSQLND_MEMORY_POOL));
ret->arena = arena;
ret->last = NULL;