Browse Source

Limit randomized SDP session version to 32-bit integer

Many of the SIP stacks use 32-bit integers internally and the Asterisk chan_sip SDP decoder will cap version to 9223372036854775807.

(cherry picked from commit 2351d7f6ac3b6e016d2be0cf5fa4a9aa5f267e1b)
mr10.5.4
Lasse Bang Mikkelsen 3 years ago
committed by Richard Fuchs
parent
commit
85a53dc03b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      daemon/sdp.c

+ 1
- 1
daemon/sdp.c View File

@ -2681,7 +2681,7 @@ int sdp_replace(struct sdp_chopper *chop, GQueue *sessions, struct call_monologu
if (!monologue->sdp_version) {
monologue->sdp_version = session->origin.version_num;
if (monologue->sdp_version == 0 || monologue->sdp_version == ULLONG_MAX)
monologue->sdp_version = ssl_random();
monologue->sdp_version = (unsigned int)ssl_random();
}
if (session->origin.parsed && flags->replace_origin &&


Loading…
Cancel
Save