comparison src/os/unix/ngx_alloc.c @ 4982:6ccd3a50b40f

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 21 Dec 2012 16:13:03 +0000
parents d620f497c50f
children
comparison
equal deleted inserted replaced
4981:5889bc5f7a65 4982:6ccd3a50b40f