current commit
250724.6 · Add support for `reallocarray` libc function (#24775)
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main(void) {
  char* p = calloc(4, sizeof(char));
  assert(p);

  strcpy(p, "foo");
  puts(p);

  p = reallocarray(p, 32, sizeof(char));
  assert(p);

  strcpy(p, "foobar");
  puts(p);

  free(p);
  return 0;
}