1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 19:42:53 -08:00

Allow unaligned-size allocations in igc_xzalloc_ambig

* src/igc.c (igc_xzalloc_ambig): Increase size argument so it's aligned.
This commit is contained in:
Pip Cet 2024-07-13 15:56:41 +00:00
parent 7591e5b0a4
commit fe6849068f

View file

@ -2947,6 +2947,8 @@ igc_xzalloc_ambig (size_t size)
/* Not sure if xzalloc can ever return NULL here, depending on all the
config options involved. Also not sure when it returns non-null for
size 0. It does for me on macOS. */
while (size % IGC_ALIGN_DFLT)
size++;
void *p = xzalloc (size);
if (p == NULL)
return NULL;