projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a814fb6
)
* fix off by one in buffer size
author
Wilfried Göesgens
<willi@citadel.org>
Fri, 9 Oct 2009 19:27:56 +0000
(19:27 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Fri, 9 Oct 2009 19:27:56 +0000
(19:27 +0000)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index 5b4a2090778ac783c6e48da262794ca030eb4203..e16d806187cfca90722a2907bc2b8b2fe17d2803 100644
(file)
--- a/
libcitadel/lib/stringbuf.c
+++ b/
libcitadel/lib/stringbuf.c
@@
-1671,7
+1671,7
@@
int StrBufTCP_read_line(StrBuf *buf, int *fd, int append, const char **Error)
break;
if (buf->buf[len] != '\r')
len ++;
- if (len >= buf->BufSize) {
+ if (len
+ 2
>= buf->BufSize) {
buf->BufUsed = len;
buf->buf[len+1] = '\0';
IncreaseBuf(buf, 1, -1);