-const char filters_rcs[] = "$Id: filters.c,v 1.192 2014/10/18 11:30:24 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.195 2015/12/27 12:46:34 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
{
p = strchr(acl_spec, ':');
}
+ if (p != NULL)
+ {
+ assert(*p == ':');
+ *p = '\0';
+ p++;
+ }
#ifdef HAVE_RFC2553
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
- i = getaddrinfo(acl_spec, ((p) ? ++p : NULL), &hints, &result);
+ i = getaddrinfo(acl_spec, p, &hints, &result);
if (i != 0)
{
{
char *endptr;
- *p++ = '\0';
port = strtol(p, &endptr, 10);
if (port <= 0 || port > 65535 || *endptr != '\0')
char *p;
/* Could be considered wasteful if the content is 'large'. */
- *size = (*size > READ_LENGTH) ? *size * 2 : READ_LENGTH;
+ *size += (*size >= READ_LENGTH) ? *size : READ_LENGTH;
p = realloc(filter_output, *size);
if (p == NULL)
}
filter_output = p;
}
+ assert(new_size + READ_LENGTH < *size);
len = fread(&filter_output[new_size], 1, READ_LENGTH, fp);
if (len > 0)
{