Change ngx_rtmp_exec_run return type to void #1786
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Svace SAST tool have found an issue in using of
ngx_rtmp_exec_run
function. The function hasngx_int_t
return value type but this value is never checked throughout the code. For example:nginx-rtmp-module/ngx_rtmp_exec_module.c
Line 638 in 6c7719d
nginx-rtmp-module/ngx_rtmp_exec_module.c
Lines 610 to 615 in 6c7719d
nginx-rtmp-module/ngx_rtmp_exec_module.c
Line 1134 in 6c7719d
nginx-rtmp-module/ngx_rtmp_exec_module.c
Lines 1154 to 1156 in 6c7719d
All functions that call
ngx_rtmp_exec_run
are alsostatic void
functions so they can't send that value further up and it it's not convinient thing to do.ngx_rtmp_exec_run
prints all required debug data to logs and we won't lose anything if we remove returnNGX_ERROR
orNGX_OK
values and SAST tools will stop triggering on those.