/*
- * $Id: mime.cc,v 1.23 1996/11/22 08:38:51 wessels Exp $
+ * $Id: mime.cc,v 1.24 1996/11/23 07:06:56 wessels Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
char *q = NULL;
char got = 0;
int namelen = strlen(name);
+ int l;
if (!mime || !name)
return NULL;
continue;
if (!isspace(p[namelen]) && p[namelen] != ':')
continue;
- xstrncpy(header, p, strcspn(p, "\n\r") + 1);
+ l = strcspn(p, "\n\r") + 1;
+ if (l > GET_HDR_SZ)
+ l = GET_HDR_SZ;
+ xstrncpy(header, p, l);
debug(25, 5, "mime_get_header: checking '%s'\n", header);
q = header;
q += namelen;