From c4769721bef5c956601a4dc8e598b137fad3a341 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Sat, 24 Oct 2015 19:17:03 +0200 Subject: zrtp: fix ZID verification check patch from Ingo Feinerer --- modules/zrtp/zrtp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/zrtp/zrtp.c b/modules/zrtp/zrtp.c index cc3b2e0..8757f4e 100644 --- a/modules/zrtp/zrtp.c +++ b/modules/zrtp/zrtp.c @@ -278,7 +278,6 @@ static int verify_sas(struct re_printf *pf, void *arg) (void)pf; if (str_isset(carg->prm)) { - char *s2h; char rzid[ZRTP_STRING16] = ""; zrtp_status_t s; zrtp_string16_t remote_zid = ZSTR_INIT_EMPTY(remote_zid); @@ -288,12 +287,8 @@ static int verify_sas(struct re_printf *pf, void *arg) return EINVAL; } - s2h = str2hex(carg->prm, (int) str_len(carg->prm), - rzid, sizeof(rzid)); - if (str_len(rzid) != sizeof(zrtp_zid_t)) { - warning("zrtp: str2hex failed (%s)\n", s2h); - return EINVAL; - } + (void) str2hex(carg->prm, (int) str_len(carg->prm), + rzid, sizeof(rzid)); zrtp_zstrncpyc(ZSTR_GV(remote_zid), (const char*)rzid, sizeof(zrtp_zid_t)); -- cgit v1.2.3