libosmo-mgcp: always check result of msgb_printf() in add_fmtp()

Change-Id: I218ac21612116366eabd0c75ce3648bad4e27abf
This commit is contained in:
Vadim Yanitskiy 2020-07-07 14:12:26 +07:00 committed by fixeria
parent b7d395d83a
commit 13fae78b32
1 changed files with 2 additions and 0 deletions

View File

@ -478,6 +478,8 @@ static int add_fmtp(struct msgb *sdp, struct sdp_fmtp_param *fmtp_params, unsign
for (i = 0; i < fmtp_params_len; i++) {
rc = msgb_printf(sdp, "a=fmtp:%u", fmtp_params[i].payload_type);
if (rc < 0)
return -EINVAL;
/* Add amr octet align parameter */
if (fmtp_params[i].param.amr_octet_aligned_present) {