The official NGINX Open Source repository.
Go to file
Vladimir Khomutov d8fa024ef1 HTTP: uniform checks in ngx_http_alloc_large_header_buffer().
If URI is not fully parsed yet, some pointers are not set.  As a result,
the calculation of "new + (ptr - old)" expression is flawed.

According to C11, 6.5.6 Additive operators, p.9:

: When two pointers are subtracted, both shall point to elements
: of the same array object, or one past the last element of the
: array object

Since "ptr" is not set, subtraction leads to undefined behaviour, because
"ptr" and "old" are not in the same buffer (i.e. array objects).

Prodded by GCC undefined behaviour sanitizer.
2023-11-29 11:13:05 +03:00
auto SSL: avoid using OpenSSL config in build directory (ticket #2404). 2023-06-21 01:29:53 +03:00
conf MIME: added image/avif type. 2021-10-25 20:49:15 +03:00
contrib Contrib: vim syntax, update core and 3rd party module directives. 2023-07-24 18:04:41 +03:00
docs nginx-1.25.3-RELEASE 2023-10-24 16:46:46 +03:00
misc Updated OpenSSL and zlib used for win32 builds. 2023-10-23 21:50:26 +03:00
src HTTP: uniform checks in ngx_http_alloc_large_header_buffer(). 2023-11-29 11:13:05 +03:00
.hgtags release-1.25.3 tag 2023-10-24 16:46:47 +03:00