We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ae11e commit e23bd13Copy full SHA for e23bd13
srtp/srtp.c
@@ -4910,6 +4910,12 @@ srtp_err_status_t srtp_stream_list_insert(srtp_stream_list_t list,
4910
*/
4911
if (list->size == list->capacity) {
4912
size_t new_capacity = list->capacity + ((list->capacity + 1u) / 2u);
4913
+
4914
+ // check for capacity overflow.
4915
+ if (new_capacity <= list->capacity) {
4916
+ return srtp_err_status_alloc_fail;
4917
+ }
4918
4919
list_entry *new_entries =
4920
srtp_crypto_alloc(sizeof(list_entry) * new_capacity);
4921
if (new_entries == NULL) {
0 commit comments