1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.5'

* PHP-8.5:
  ext/posix: (Further) fix groups array creation on macos.
This commit is contained in:
David Carlier
2025-12-22 12:55:29 +00:00

View File

@@ -699,7 +699,8 @@ static void php_posix_group_to_array(struct group *g, zval *array_group) /* {{{
for (count = 0;; count++) {
/* gr_mem entries may be misaligned on macos. */
char *gr_mem;
memcpy(&gr_mem, &g->gr_mem[count], sizeof(char *));
char *entry = (char *)g->gr_mem + (count * sizeof (char *));
memcpy(&gr_mem, entry, sizeof(char *));
if (!gr_mem) {
break;
}