now header fields witch lines 998 chars and crlf
are accepted.
char *value;
size_t valuelen;
size_t alloclen;
+ boolean crlf;
};
/* m_getfld2() states */
}
}
- if (nchars > NAMESZ) {
+ f->crlf = (nchars > 2 && tmpline[nchars-2] == '\r');
+ if (nchars > NAMESZ+1 || (!f->crlf && nchars > NAMESZ)) {
ret = LENERR2;
}
return IOERR2;
}
- if (nchars > NAMESZ) {
+ if (nchars > NAMESZ+1 || (!f->crlf && nchars > NAMESZ)) {
ret = LENERR2;
}
}
}
+ f->crlf = (nchars > 2 && tmpline[nchars-2] == '\r');
free(f->value);
f->value = tmpline;
f->valuelen = nchars;