aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_inet.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-12-21 16:13:03 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-12-21 16:13:03 +0000
commit4b6f8dcd2a838f0528a4de1d9c247101fe7907fb (patch)
tree07931944c7f05bc5c07f94255b03771d25a4e220 /src/core/ngx_inet.c
parentf25549210d230d5e6bb3ebb81dac897b8d35f113 (diff)
downloadnginx-4b6f8dcd2a838f0528a4de1d9c247101fe7907fb.tar.gz
nginx-4b6f8dcd2a838f0528a4de1d9c247101fe7907fb.zip
Core: crypt_r() error handling fixed.
The crypt_r() function returns NULL on errors, check it explicitly instead of assuming errno will remain 0 if there are no errors (per POSIX, the setting of errno after a successful call to a function is unspecified unless the description of that function specifies that errno shall not be modified). Additionally, dropped unneeded ngx_set_errno(0) and fixed error handling of memory allocation after normal crypt(), which was inapropriate and resulted in null pointer dereference on allocation failures.
Diffstat (limited to 'src/core/ngx_inet.c')
0 files changed, 0 insertions, 0 deletions