mirror of
https://github.com/nginx/nginx.git
synced 2025-01-21 05:43:10 -06:00
fix SSL connection issues on platforms with 32-bit off_t
patch by Maxim Dounin
This commit is contained in:
parent
a7ed0951e3
commit
b0b6bcedfc
@ -127,5 +127,7 @@ typedef intptr_t ngx_flag_t;
|
||||
#define NGX_MAX_UINT32_VALUE (uint32_t) 0xffffffff
|
||||
#endif
|
||||
|
||||
#define NGX_MAX_INT32_VALUE (uint32_t) 0x7fffffff
|
||||
|
||||
|
||||
#endif /* _NGX_CONFIG_H_INCLUDED_ */
|
||||
|
@ -986,10 +986,10 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
||||
}
|
||||
|
||||
|
||||
/* the maximum limit size is the maximum uint32_t value - the page size */
|
||||
/* the maximum limit size is the maximum int32_t value - the page size */
|
||||
|
||||
if (limit == 0 || limit > (off_t) (NGX_MAX_UINT32_VALUE - ngx_pagesize)) {
|
||||
limit = NGX_MAX_UINT32_VALUE - ngx_pagesize;
|
||||
if (limit == 0 || limit > (off_t) (NGX_MAX_INT32_VALUE - ngx_pagesize)) {
|
||||
limit = NGX_MAX_INT32_VALUE - ngx_pagesize;
|
||||
}
|
||||
|
||||
buf = c->ssl->buf;
|
||||
|
Loading…
Reference in New Issue
Block a user