Skip to content

Commit

Permalink
Remove length checks as bzero is setting length to zero for custom_ca…
Browse files Browse the repository at this point in the history
…ll_id
  • Loading branch information
austinkottke committed Aug 30, 2024
1 parent 5b838bd commit 56bafb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pjsip/src/pjsua-lib/pjsua_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,7 @@ PJ_DEF(pj_status_t) pjsua_call_make_call(pjsua_acc_id acc_id,
(int)dlg->call_id->id.slen, dlg->call_id->id.ptr ));
pj_bzero(&call->opt.custom_call_id,
sizeof(call->opt.custom_call_id));
call->opt.custom_call_id.slen=0;
}
}

/* Increment the dialog's lock otherwise when invite session creation
* fails the dialog will be destroyed prematurely.
Expand Down
4 changes: 1 addition & 3 deletions pjsip/src/pjsua2/call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ void CallSetting::fromPj(const pjsua_call_setting &prm)
this->audioCount = prm.aud_cnt;
this->videoCount = prm.vid_cnt;
this->mediaDir.clear();

if( prm.custom_call_id.slen > 0 )
this->customCallId = pj2Str(prm.custom_call_id);
this->customCallId = pj2Str(prm.custom_call_id);

/* Since we don't know the size of media_dir array, we populate
* mediaDir vector up to the element with non-default value.
Expand Down

0 comments on commit 56bafb7

Please sign in to comment.