소스 검색

cnxcc: use snprintf() instead of sprintf()

Daniel-Constantin Mierla 5 년 전
부모
커밋
05bd956a99
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/modules/cnxcc/cnxcc_sip_msg_faker.c

+ 1 - 1
src/modules/cnxcc/cnxcc_sip_msg_faker.c

@@ -40,7 +40,7 @@ int faked_msg_init_with_dlg_info(str *callid, str *from_uri, str *from_tag,
 {
 	memset(_faked_sip_msg_buf, 0, FAKED_SIP_MSG_BUF_LEN);
 
-	sprintf(_faked_sip_msg_buf, FAKED_SIP_MSG_FORMAT, from_uri->len,
+	snprintf(_faked_sip_msg_buf, FAKED_SIP_MSG_BUF_LEN, FAKED_SIP_MSG_FORMAT, from_uri->len,
 			from_uri->s, from_tag->len, from_tag->s, to_uri->len, to_uri->s,
 			to_tag->len, to_tag->s, callid->len, callid->s);