From 7f8730b186115462edc7f01c173acca0a28e0049 Mon Sep 17 00:00:00 2001 From: Praveen Kumar D Date: Mon, 15 May 2023 15:31:40 +0530 Subject: [PATCH] Use strcmp for strings --- src/switch_rtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index acba20bc36..9cbbb5414d 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -3079,7 +3079,7 @@ static int dtls_state_setup(switch_rtp_t *rtp_session, switch_dtls_t *dtls) fp.type = dtls->remote_fp->type; switch_core_cert_extract_fingerprint(cert, &fp); - r = !memcmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN); + r = !strncmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN); X509_free(cert); } @@ -3279,7 +3279,7 @@ static int cb_verify_peer(int preverify_ok, X509_STORE_CTX *ctx) fp.type = dtls->remote_fp->type; switch_core_cert_extract_fingerprint(cert, &fp); - r = !memcmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN); + r = !strncmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN); X509_free(cert); } else {