Latest update - 7395
This commit is contained in:
@@ -2013,6 +2013,14 @@ ngx_sort(void *base, size_t n, size_t size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ngx_explicit_memzero(void *buf, size_t n)
|
||||||
|
{
|
||||||
|
ngx_memzero(buf, n);
|
||||||
|
ngx_memory_barrier();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if (NGX_MEMCPY_LIMIT)
|
#if (NGX_MEMCPY_LIMIT)
|
||||||
|
|
||||||
void *
|
void *
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ ngx_strlchr(u_char *p, u_char *last, u_char c)
|
|||||||
#define ngx_memzero(buf, n) (void) memset(buf, 0, n)
|
#define ngx_memzero(buf, n) (void) memset(buf, 0, n)
|
||||||
#define ngx_memset(buf, c, n) (void) memset(buf, c, n)
|
#define ngx_memset(buf, c, n) (void) memset(buf, c, n)
|
||||||
|
|
||||||
|
void ngx_explicit_memzero(void *buf, size_t n);
|
||||||
|
|
||||||
|
|
||||||
#if (NGX_MEMCPY_LIMIT)
|
#if (NGX_MEMCPY_LIMIT)
|
||||||
|
|
||||||
|
|||||||
@@ -1059,7 +1059,7 @@ cleanup:
|
|||||||
ngx_close_file_n " \"%s\" failed", file->data);
|
ngx_close_file_n " \"%s\" failed", file->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_memzero(buf, NGX_SSL_PASSWORD_BUFFER_SIZE);
|
ngx_explicit_memzero(buf, NGX_SSL_PASSWORD_BUFFER_SIZE);
|
||||||
|
|
||||||
return passwords;
|
return passwords;
|
||||||
}
|
}
|
||||||
@@ -1076,7 +1076,7 @@ ngx_ssl_passwords_cleanup(void *data)
|
|||||||
pwd = passwords->elts;
|
pwd = passwords->elts;
|
||||||
|
|
||||||
for (i = 0; i < passwords->nelts; i++) {
|
for (i = 0; i < passwords->nelts; i++) {
|
||||||
ngx_memzero(pwd[i].data, pwd[i].len);
|
ngx_explicit_memzero(pwd[i].data, pwd[i].len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user