rem: slotvec = xrealloc (slotvec, s);
add: slotvec = xrealloc (slotvec, n1 * sizeof *slotvec);
context: quotearg_n_options (int n, char const *arg, size_t argsize,		    struct quoting_options const *options){  int e = errno;  /* Preallocate a slot 0 buffer, so that the caller can always quote     one small component of a "memory exhausted" message in slot 0.  */  static char slot0[256];  static unsigned int nslots = 1;  unsigned int n0 = n;  struct slotvec    {      size_t size;      char *val;    };  static struct slotvec slotvec0 = {sizeof slot0, slot0};  static struct slotvec *slotvec = &slotvec0;  if (n < 0)    abort ();  if (nslots <= n0)    {      unsigned int n1 = n0 + 1;      size_t s = n1 * sizeof *slotvec;      if (SIZE_MAX / UINT_MAX <= sizeof *slotvec	  && n1 != s / sizeof *slotvec)	xalloc_die ();      if (slotvec == &slotvec0)	{	  slotvec = xmalloc (sizeof *slotvec);	  *slotvec = slotvec0;	}      slotvec = xrealloc (slotvec, s);      memset (slotvec + nslots, 0, (n1 - nslots) * sizeof *slotvec);      nslots = n1;    }  {    size_t size = slotvec[n].size;    char *val = slotvec[n].val;    size_t qsize = quotearg_buffer (val, size, arg, argsize, options);    if (size <= qsize)      {	slotvec[n].size = size = qsize + 1;	slotvec[n].val = val = xrealloc (val == slot0 ? 0 : val, size);	quotearg_buffer (val, size, arg, argsize, options);      }    errno = e;    return val;  }}