Fix a use of an uninitialized variable by makeing sure
that sctp_med_chunk_output() always initialized the reason_code instead of relying on the caller. The variable is only used for debugging purpose. This issue was reported by Peter Bostroem from Google. MFC after: 3 days
This commit is contained in:
parent
d6738a4a17
commit
b3817112b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273634
@ -6748,7 +6748,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
|
||||
if (do_chunk_output)
|
||||
sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_USR_SEND, SCTP_SO_NOT_LOCKED);
|
||||
else if (added_control) {
|
||||
int num_out = 0, reason = 0, now_filled = 0;
|
||||
int num_out, reason, now_filled = 0;
|
||||
struct timeval now;
|
||||
int frag_point;
|
||||
|
||||
@ -7814,6 +7814,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
int quit_now = 0;
|
||||
|
||||
*num_out = 0;
|
||||
*reason_code = 0;
|
||||
auth_keyid = stcb->asoc.authinfo.active_keyid;
|
||||
if ((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) ||
|
||||
(asoc->state & SCTP_STATE_SHUTDOWN_RECEIVED) ||
|
||||
@ -9945,7 +9946,7 @@ sctp_chunk_output(struct sctp_inpcb *inp,
|
||||
*/
|
||||
struct sctp_association *asoc;
|
||||
struct sctp_nets *net;
|
||||
int error = 0, num_out = 0, tot_out = 0, ret = 0, reason_code = 0;
|
||||
int error = 0, num_out, tot_out = 0, ret = 0, reason_code;
|
||||
unsigned int burst_cnt = 0;
|
||||
struct timeval now;
|
||||
int now_filled = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user