Fixed coverity warnings
This commit is contained in:
parent
528afc8cea
commit
a2abae0a40
|
@ -40,6 +40,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
/* coverity[+kill] */
|
||||
static void pj_scan_syntax_err(pj_scanner *scanner)
|
||||
{
|
||||
(*scanner->callback)(scanner);
|
||||
|
|
|
@ -536,7 +536,7 @@ static void on_request_complete(pj_stun_session *stun_sess,
|
|||
eattr = (pj_stun_errcode_attr*)
|
||||
pj_stun_msg_find_attr(response, PJ_STUN_ATTR_ERROR_CODE, 0);
|
||||
|
||||
if (eattr != NULL)
|
||||
if (eattr != NULL && eattr->err_code)
|
||||
err_code = eattr->err_code;
|
||||
else
|
||||
err_code = PJ_STUN_SC_SERVER_ERROR;
|
||||
|
|
|
@ -350,6 +350,10 @@ PJ_DEF(pj_status_t) pj_stun_authenticate_request(const pj_uint8_t *pkt,
|
|||
pj_stun_create_key(pool, &p_info->auth_key,
|
||||
(arealm?&arealm->value:NULL), &auser->value,
|
||||
data_type, &password);
|
||||
if (!p_info->auth_key.ptr) {
|
||||
pj_assert(!"Null key");
|
||||
return PJ_EBUG;
|
||||
}
|
||||
} else {
|
||||
err_code = PJ_STUN_SC_UNAUTHORIZED;
|
||||
goto on_auth_failed;
|
||||
|
|
Loading…
Reference in New Issue