diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2019-07-18 18:27:44 +0300 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2019-07-18 18:27:44 +0300 |
| commit | 551640703a502a252b24c84d1b9e6541ee88de34 (patch) | |
| tree | 0b4c0f6e13b4c4d832ddf55b15d2e67a8c887c0c /src/mysql/ngx_mysql.h | |
| parent | 676d1a0e947c8f39e2606997a3628ec6bdea177d (diff) | |
| download | nginx-551640703a502a252b24c84d1b9e6541ee88de34.tar.gz nginx-551640703a502a252b24c84d1b9e6541ee88de34.tar.bz2 | |
Core: fixed segfault with too large bucket sizes (ticket #1806).
To save memory hash code uses u_short to store resulting bucket sizes,
so maximum bucket size is limited to 65536 minus ngx_cacheline_size (larger
values will be aligned to 65536 which will overflow u_short). However,
there were no checks to enforce this, and using larger bucket sizes
resulted in overflows and segmentation faults.
Appropriate safety checks to enforce this added to ngx_hash_init().
Diffstat (limited to 'src/mysql/ngx_mysql.h')
0 files changed, 0 insertions, 0 deletions
