X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fspost.c;h=fd0cbcc96d98645b986abf0215a3f85db9cf2df7;hb=ca984be73bdba8c9e807aa56be6403a7b790ed21;hp=53ae86a72538b71b30764bdec435315988c0e6f8;hpb=04a3dfc70394a517a79340a7d3ecd9c6a23d0bee;p=mmh diff --git a/uip/spost.c b/uip/spost.c index 53ae86a..fd0cbcc 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -39,6 +39,7 @@ static struct swit switches[] = { { NULL, 0 } }; +char *version=VERSION; /* flags for headers->flags */ #define HNOP 0x0000 /* just used to keep .set around */ @@ -244,6 +245,9 @@ main(int argc, char **argv) finish_headers(out); fprintf(out, "\n%s", f.value); while ((state = m_getfld2(state, &f, in)) == BODY2) { + if (f.valuelen > NAMESZ+1 || (!f.crlf && f.valuelen > NAMESZ)) { + adios(EX_DATAERR, NULL, "Body contains a to long line"); + } fputs(f.value, out); } break; @@ -265,6 +269,10 @@ main(int argc, char **argv) } fclose(in); + if (state != FILEEOF2) { + adios(EX_IOERR, "m_getfld2", "Error while reading body"); + } + if (debug) { struct mailname *i = recipients; /* stop here */