Browse Source

Some small buffer.c fixes (closes #1837)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2380 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.21
Stefan Bühler 13 years ago
parent
commit
4642508de3
  1. 1
      NEWS
  2. 3
      src/buffer.c

1
NEWS

@ -26,6 +26,7 @@ NEWS
* Fix uninitialized value in time struct after strptime
* Do not pass Proxy-Connection: header from client to backend http server in mod_proxy (#1877)
* Fix wrong malloc sizes in mod_accesslog (probably nothing bad happened...) (fixes #1855, thx ycheng)
* Some small buffer.c fixes (closes #1837)
- 1.4.20 - 2008-09-30

3
src/buffer.c

@ -159,7 +159,7 @@ int buffer_copy_string_buffer(buffer *b, const buffer *src) {
if (!src) return -1;
if (src->used == 0) {
b->used = 0;
buffer_reset(b);
return 0;
}
return buffer_copy_string_len(b, src->ptr, src->used - 1);
@ -187,6 +187,7 @@ int buffer_append_string_rfill(buffer *b, const char *s, size_t maxlen) {
if (!s || !b) return -1;
s_len = strlen(s);
if (s_len > maxlen) s_len = maxlen;
buffer_prepare_append(b, maxlen + 1);
if (b->used == 0)
b->used++;

Loading…
Cancel
Save