Mercurial > hg > nginx-quic
view src/os/win32/ngx_dlopen.c @ 6671:6b1b8c4b7a95
Realip: fixed uninitialized memory access.
Previously, the realip module could be left with uninitialized context after an
error in the ngx_http_realip_set_addr() function. That context could be later
accessed by $realip_remote_addr and $realip_remote_port variable handlers.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 01 Sep 2016 14:33:51 +0300 |
parents | 7142b04337d6 |
children |
line wrap: on
line source
/* * Copyright (C) Maxim Dounin * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> char * ngx_dlerror(void) { u_char *p; static u_char errstr[NGX_MAX_ERROR_STR]; p = ngx_strerror(ngx_errno, errstr, NGX_MAX_ERROR_STR); *p = '\0'; return (char *) errstr; }