mgcp: Fix SDP formatting of fmtp_extra (Coverity)
Currently when ftmp_extra is set, a doubled a=rtpmap line is emitted
instead of the fmtp_extra info.
This patch fixes replaces the formerly copied and pasted but not
modified snprintf parameters by the correct ones.
Fixes: Coverity CID 1220873
Sponsored-by: On-Waves ehf
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index f0457d1..6e48949 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -287,8 +287,7 @@
if (fmtp_extra) {
nchars = snprintf(sdp_record + len, size - len,
- "a=rtpmap:%d %s\r\n",
- payload_type, audio_name);
+ "%s\r\n", fmtp_extra);
if (nchars < 0 || nchars >= size - len)
goto buffer_too_small;