Permalink
Browse files

fixed wrong memory copy when the line is large than 32k

  • Loading branch information...
1 parent 7c10ab5 commit b32237dfaf5953da70cfdcf845b1346681f63f78 @yaoweibin committed Aug 14, 2012
Showing with 86 additions and 2 deletions.
  1. +2 −2 ngx_http_subs_filter_module.c
  2. +84 −0 test/t/subs.t
View
4 ngx_http_subs_filter_module.c
@@ -848,10 +848,10 @@ buffer_append_string(ngx_buf_t *b, u_char *s, size_t len, ngx_pool_t *pool)
return NULL;
}
+ b->last = ngx_copy(p, b->pos, size);
+
b->start = b->pos = p;
b->end = p + capacity;
-
- b->last = ngx_copy(p, b->pos, size);
}
b->last = ngx_copy(b->last, s, len);
View
84 test/t/subs.t
84 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit b32237d

Please sign in to comment.