* the new MIME message.
*/
for (compnum = 1, state = FLD;;) {
- switch (state = m_getfld (state, name, buf, sizeof(buf), in)) {
+ int bufsz = sizeof buf;
+ switch (state = m_getfld (state, name, buf, &bufsz, in)) {
case FLD:
case FLDPLUS:
case FLDEOF:
/* ignore any Content-Type fields in the header */
if (!mh_strcasecmp (name, TYPE_FIELD)) {
- while (state == FLDPLUS)
- state = m_getfld (state, name, buf, sizeof(buf), in);
+ while (state == FLDPLUS) {
+ bufsz = sizeof buf;
+ state = m_getfld (state, name, buf, &bufsz, in);
+ }
goto finish_field;
}
/* if necessary, get rest of field */
while (state == FLDPLUS) {
- state = m_getfld (state, name, buf, sizeof(buf), in);
+ bufsz = sizeof buf;
+ state = m_getfld (state, name, buf, &bufsz, in);
vp = add (buf, vp); /* add to previous value */
}