|
@@ -0,0 +1,15 @@
+diff -ur nginx-1.2.5.orig/src/core/ngx_string.h nginx-1.2.5/src/core/ngx_string.h
+--- nginx-1.2.5.orig/src/core/ngx_string.h 2012-09-24 22:34:04.000000000 +0400
++++ nginx-1.2.5/src/core/ngx_string.h 2012-11-14 11:36:25.226866540 +0400
+@@ -83,8 +83,8 @@
+ * while ZeroMemory() and bzero() are the calls.
+ * icc7 may also inline several mov's of a zeroed register for small blocks.
+ */
+-#define ngx_memzero(buf, n) (void) memset(buf, 0, n)
+-#define ngx_memset(buf, c, n) (void) memset(buf, c, n)
++#define ngx_memzero(buf, n) (void) ( n ? memset(buf, 0, n) : buf )
++#define ngx_memset(buf, c, n) (void) ( n ? memset(buf, c, n) : buf )
+
+
+ #if (NGX_MEMCPY_LIMIT)
+
\ No newline at end of file
|