osmux: fix unchecked return value in mgcp_parse_osmux_cid()
** CID 1232804: Unchecked return value (CHECKED_RETURN) /src/libmgcp/mgcp_protocol.c: 888 in mgcp_parse_osmux_cid()
This commit is contained in:
parent
4ef66b1c5f
commit
3ba3cf85e1
|
@ -883,9 +883,11 @@ uint32_t mgcp_rtp_packet_duration(struct mgcp_endpoint *endp,
|
|||
|
||||
static int mgcp_parse_osmux_cid(const char *line)
|
||||
{
|
||||
uint32_t osmux_cid;
|
||||
int osmux_cid;
|
||||
|
||||
if (sscanf(line + 2, "Osmux: %u", &osmux_cid) != 1)
|
||||
return -1;
|
||||
|
||||
sscanf(line + 2, "Osmux: %u", &osmux_cid);
|
||||
if (osmux_cid > OSMUX_CID_MAX) {
|
||||
LOGP(DMGCP, LOGL_ERROR, "Osmux ID too large: %u > %u\n",
|
||||
osmux_cid, OSMUX_CID_MAX);
|
||||
|
|
Loading…
Reference in New Issue