From ee7216bfa68ecc204f4a9b9154f18a9f284a7c3a Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 29 Aug 2011 13:11:47 +0000 Subject: [PATCH] Merge of r4018: Fix buffer overrun under Windows. --- src/os/win32/ngx_files.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/win32/ngx_files.c b/src/os/win32/ngx_files.c index 424bd6550..25690eb0f 100644 --- a/src/os/win32/ngx_files.c +++ b/src/os/win32/ngx_files.c @@ -228,7 +228,8 @@ ngx_win32_rename_file(ngx_str_t *from, ngx_str_t *to, ngx_log_t *log) ngx_uint_t collision; ngx_atomic_uint_t num; - name = ngx_alloc(to->len + 1 + 10 + 1 + sizeof("DELETE"), log); + name = ngx_alloc(to->len + 1 + NGX_ATOMIC_T_LEN + 1 + sizeof("DELETE"), + log); if (name == NULL) { return NGX_ENOMEM; }