mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Merge "AST-2016-003 udptl.c: Fix uninitialized values." into 13
This commit is contained in:
15
main/udptl.c
15
main/udptl.c
@@ -305,16 +305,15 @@ static int decode_open_type(uint8_t *buf, unsigned int limit, unsigned int *len,
|
|||||||
if (decode_length(buf, limit, len, &octet_cnt) != 0)
|
if (decode_length(buf, limit, len, &octet_cnt) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (octet_cnt > 0) {
|
/* Make sure the buffer contains at least the number of bits requested */
|
||||||
/* Make sure the buffer contains at least the number of bits requested */
|
if ((*len + octet_cnt) > limit) {
|
||||||
if ((*len + octet_cnt) > limit)
|
return -1;
|
||||||
return -1;
|
|
||||||
|
|
||||||
*p_num_octets = octet_cnt;
|
|
||||||
*p_object = &buf[*len];
|
|
||||||
*len += octet_cnt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*p_num_octets = octet_cnt;
|
||||||
|
*p_object = &buf[*len];
|
||||||
|
*len += octet_cnt;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*- End of function --------------------------------------------------------*/
|
/*- End of function --------------------------------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user