You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openresty/patches/nginx-0.8.54-redirect_memcp...

16 lines
491 B
C

--- nginx-0.8.54/src/http/ngx_http_script.c 2010-05-14 17:56:37.000000000 +0800
+++ nginx-0.8.54-patched/src/http/ngx_http_script.c 2010-06-07 17:15:27.399312041 +0800
@@ -983,7 +983,11 @@
NGX_UNESCAPE_REDIRECT);
if (src < e->pos) {
- dst = ngx_copy(dst, src, e->pos - src);
+ if (src != dst) {
+ memmove(dst, src, e->pos - src);
+ }
+
+ dst += e->pos - src;
}
e->pos = dst;