diff options
author | Alfred E. Heggestad <aeh@db.org> | 2015-10-24 19:17:03 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2015-10-24 19:17:03 +0200 |
commit | c4769721bef5c956601a4dc8e598b137fad3a341 (patch) | |
tree | 0be9603ccca670f4ad0c08dcf15b28dc27def7d7 /modules | |
parent | 17e01997adb1985b1fd2847e9d7e2cfc88efb18e (diff) |
zrtp: fix ZID verification check
patch from Ingo Feinerer
Diffstat (limited to 'modules')
-rw-r--r-- | modules/zrtp/zrtp.c | 9 |
1 files 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)); |