projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e15110
)
Whoops, I need to make sure the buffer I pass to putcomp() is NULL-terminated.
author
Ken Hornstein
<kenh@pobox.com>
Tue, 31 Jan 2012 18:20:40 +0000
(13:20 -0500)
committer
Ken Hornstein
<kenh@pobox.com>
Tue, 31 Jan 2012 18:20:40 +0000
(13:20 -0500)
uip/mhlsbr.c
patch
|
blob
|
history
diff --git
a/uip/mhlsbr.c
b/uip/mhlsbr.c
index
1446c2a
..
a44413c
100644
(file)
--- a/
uip/mhlsbr.c
+++ b/
uip/mhlsbr.c
@@
-1949,7
+1949,8
@@
filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp)
holder.c_text = buf;
- while ((cc = read(fdoutput[0], buf, bufsz)) > 0) {
+ while ((cc = read(fdoutput[0], buf, bufsz - 1)) > 0) {
+ buf[cc] = '\0';
putcomp(c1, &holder, BODYCOMP);
}