You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that this function can return NULL. Therefore, when using it, it is important to check the result for NULL in order to avoid possible errors. And as a rule, such check is performed in other modules that use this function.
What do you think about adding the NULL checks?
Found by Linux Verification Center (linuxtesting.org) with SVACE.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hello! I was analyzing Nginx modules with the Svace static analyzer. It has found an inconsistency code at the following sections of the code:
nginx-http-auth-digest/ngx_http_auth_digest_module.c
Lines 1227 to 1247 in 5a2cae4
and
nginx-http-auth-digest/ngx_http_auth_digest_module.c
Lines 1286 to 1308 in 5a2cae4
In both methods the result value
dropnode
of method invocationngx_array_push
is dereferenced without checking for NULL:nginx-http-auth-digest/ngx_http_auth_digest_module.c
Line 1245 in 5a2cae4
and
nginx-http-auth-digest/ngx_http_auth_digest_module.c
Line 1306 in 5a2cae4
Here's the source code for function
ngx_array_push
:https://github.com/nginx/nginx/blob/ecb809305e54ed15be9f620d56b19ff4e4be7db5/src/core/ngx_array.c#L47-L91
Note that this function can return NULL. Therefore, when using it, it is important to check the result for NULL in order to avoid possible errors. And as a rule, such check is performed in other modules that use this function.
What do you think about adding the NULL checks?
Found by Linux Verification Center (linuxtesting.org) with SVACE.
The text was updated successfully, but these errors were encountered: