diff --git a/include/stream_list_priv.h b/include/stream_list_priv.h index f49cd551d..b61af188e 100644 --- a/include/stream_list_priv.h +++ b/include/stream_list_priv.h @@ -45,7 +45,7 @@ #ifndef SRTP_STREAM_LIST_PRIV_H #define SRTP_STREAM_LIST_PRIV_H -#include +#include "srtp_priv.h" #ifdef __cplusplus extern "C" { diff --git a/test/cutest.h b/test/cutest.h index f64667143..94e1087e6 100644 --- a/test/cutest.h +++ b/test/cutest.h @@ -467,7 +467,8 @@ static void test_run__(const struct test__ *test) signame = "SIGTERM"; break; default: - sprintf(tmp, "signal %d", WTERMSIG(exit_code)); + snprintf(tmp, sizeof(tmp), "signal %d", + WTERMSIG(exit_code)); signame = tmp; break; } diff --git a/test/srtp_driver.c b/test/srtp_driver.c index 42229be78..ad722bb6f 100644 --- a/test/srtp_driver.c +++ b/test/srtp_driver.c @@ -1621,22 +1621,22 @@ char *srtp_packet_to_string(srtp_hdr_t *hdr, int pkt_octet_len) } /* write packet into string */ - sprintf(packet_string, - "(s)rtp packet: {\n" - " version:\t%d\n" - " p:\t\t%d\n" - " x:\t\t%d\n" - " cc:\t\t%d\n" - " m:\t\t%d\n" - " pt:\t\t%x\n" - " seq:\t\t%x\n" - " ts:\t\t%x\n" - " ssrc:\t%x\n" - " data:\t%s\n" - "} (%d octets in total)\n", - hdr->version, hdr->p, hdr->x, hdr->cc, hdr->m, hdr->pt, hdr->seq, - hdr->ts, hdr->ssrc, octet_string_hex_string(data, hex_len), - pkt_octet_len); + snprintf(packet_string, sizeof(packet_string), + "(s)rtp packet: {\n" + " version:\t%d\n" + " p:\t\t%d\n" + " x:\t\t%d\n" + " cc:\t\t%d\n" + " m:\t\t%d\n" + " pt:\t\t%x\n" + " seq:\t\t%x\n" + " ts:\t\t%x\n" + " ssrc:\t%x\n" + " data:\t%s\n" + "} (%d octets in total)\n", + hdr->version, hdr->p, hdr->x, hdr->cc, hdr->m, hdr->pt, hdr->seq, + hdr->ts, hdr->ssrc, octet_string_hex_string(data, hex_len), + pkt_octet_len); return packet_string; }