From cb936d9fb2abc1e68c1e21ac43c82494ba102f74 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Thu, 16 Feb 2017 08:47:32 +0100 Subject: [PATCH] srtcp: use unsigned 32-bit for encrypted bit (#41) the ep is left-shifted by 31-bits. If the size of int is 4 bytes then the EP bit will end up in the top bit which is also the sign bit. it is safer and better to use an unsigned type here --- src/srtp/srtcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/srtp/srtcp.c b/src/srtp/srtcp.c index 94155e0..d29889c 100644 --- a/src/srtp/srtcp.c +++ b/src/srtp/srtcp.c @@ -34,7 +34,7 @@ int srtcp_encrypt(struct srtp *srtp, struct mbuf *mb) struct comp *rtcp; uint32_t ssrc; size_t start; - int ep = 0; + uint32_t ep = 0; int err; if (!srtp || !mb)