New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional jump on uninitialised value(s) in cws.c #900
Comments
BTW, there is no "break" for each "case" & "default" in this nn_cws_handler function. |
The lack of a "break", is because the other cases "return", and default is the last case. There is no need for a break. |
Good catch on the uninitialized variable, though. This should be cleared to zero after the cws structure is allocated. |
if their is no “break”,the function nn_fsm_bad_action will be executed muti times.... |
nn_fsm_bad_action |
@skyformat99 |
No, they won't -- because both of these call nn_fsm_error(), which aborts the program; these conditions are never supposed to arrive, and this is effectively an assertion that they do not. See src/utils/err.h for details. |
The variables cws->peer_gone is not initialized in below piece of code in function nn_cws_handler of cws.c
//
/ STOPPING_USOCK state. /
/ usock object was asked to stop but it haven't stopped yet. /
//
case NN_CWS_STATE_STOPPING_USOCK:
switch (src) {
The text was updated successfully, but these errors were encountered: