projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check for to long lines and ioerror in spost
[mmh]
/
uip
/
spost.c
diff --git
a/uip/spost.c
b/uip/spost.c
index
53ae86a
..
4e9e7ce
100644
(file)
--- a/
uip/spost.c
+++ b/
uip/spost.c
@@
-244,6
+244,9
@@
main(int argc, char **argv)
finish_headers(out);
fprintf(out, "\n%s", f.value);
while ((state = m_getfld2(state, &f, in)) == BODY2) {
finish_headers(out);
fprintf(out, "\n%s", f.value);
while ((state = m_getfld2(state, &f, in)) == BODY2) {
+ if (f.valuelen >= NAMESZ) {
+ adios(EX_DATAERR, NULL, "Body contains a to long line");
+ }
fputs(f.value, out);
}
break;
fputs(f.value, out);
}
break;
@@
-265,6
+268,10
@@
main(int argc, char **argv)
}
fclose(in);
}
fclose(in);
+ if (status != FILEEOF2) {
+ adios(EX_IOERR, "m_getfld2", "Error while reading body");
+ }
+
if (debug) {
struct mailname *i = recipients;
/* stop here */
if (debug) {
struct mailname *i = recipients;
/* stop here */