Use a format string in snprintf() for consistency.
This was reported by Radek Malcic when using the userland stack in combination with MinGW. MFC after: 1 week
This commit is contained in:
parent
2b45fde379
commit
e7f232a0db
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299533
@ -2566,7 +2566,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
|
||||
struct mbuf *op_err;
|
||||
char msg[SCTP_DIAG_INFO_LEN];
|
||||
|
||||
snprintf(msg, sizeof(msg), "I-DATA chunk received when DATA was negotiated");
|
||||
snprintf(msg, sizeof(msg), "%s", "I-DATA chunk received when DATA was negotiated");
|
||||
op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg);
|
||||
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_18;
|
||||
sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED);
|
||||
@ -2577,7 +2577,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
|
||||
struct mbuf *op_err;
|
||||
char msg[SCTP_DIAG_INFO_LEN];
|
||||
|
||||
snprintf(msg, sizeof(msg), "DATA chunk received when I-DATA was negotiated");
|
||||
snprintf(msg, sizeof(msg), "%s", "DATA chunk received when I-DATA was negotiated");
|
||||
op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg);
|
||||
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19;
|
||||
sctp_abort_an_association(inp, stcb, op_err, SCTP_SO_NOT_LOCKED);
|
||||
|
Loading…
Reference in New Issue
Block a user