projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Accept header lines of exactly 998 characters
[mmh]
/
sbr
/
m_getfld2.c
diff --git
a/sbr/m_getfld2.c
b/sbr/m_getfld2.c
index
45172aa
..
954ed33
100644
(file)
--- a/
sbr/m_getfld2.c
+++ b/
sbr/m_getfld2.c
@@
-62,7
+62,7
@@
m_getfld2(enum state s, struct field *f, FILE *msg)
}
}
}
}
- if (nchars >= NAMESZ) {
+ if (nchars > NAMESZ) {
ret = LENERR2;
}
ret = LENERR2;
}
@@
-96,14
+96,14
@@
m_getfld2(enum state s, struct field *f, FILE *msg)
f->valuelen = nchars;
}
f->valuelen = nchars;
}
- while (ret == FLD2 && (falted = is_falted(msg)) == B_TRUE) {
+ while ((ret == FLD2 || ret == LENERR2) && (falted = is_falted(msg)) == B_TRUE) {
nchars = getline(&tmpline, &len, msg);
if (nchars <= 0) {
free(tmpline);
return IOERR2;
}
nchars = getline(&tmpline, &len, msg);
if (nchars <= 0) {
free(tmpline);
return IOERR2;
}
- if (nchars >= NAMESZ) {
+ if (nchars > NAMESZ) {
ret = LENERR2;
}
ret = LENERR2;
}
@@
-145,10
+145,6
@@
m_getfld2(enum state s, struct field *f, FILE *msg)
}
}
}
}
- if (nchars >= NAMESZ) {
- ret = LENERR2;
- }
-
free(f->value);
f->value = tmpline;
f->valuelen = nchars;
free(f->value);
f->value = tmpline;
f->valuelen = nchars;