rem: regexp->buffer = (unsigned char *) xmalloc (regexp->allocated);
add: regexp->buffer = xmalloc (regexp->allocated);
context: build_type_arg (char **typep, struct re_pattern_buffer *regexp){  const char *errmsg;  int rval = TRUE;  int optlen;  switch (*optarg)    {    case 'a':    case 't':    case 'n':      *typep = optarg;      break;    case 'p':      *typep = optarg++;      optlen = strlen (optarg);      regexp->allocated = optlen * 2;      regexp->buffer = (unsigned char *) xmalloc (regexp->allocated);      regexp->translate = NULL;      regexp->fastmap = xmalloc (256);      regexp->fastmap_accurate = 0;      errmsg = re_compile_pattern (optarg, optlen, regexp);      if (errmsg)	error (EXIT_FAILURE, 0, "%s", errmsg);      break;    default:      rval = FALSE;      break;    }  return rval;}