Description: Free previous Digest parameter values before replacing them Repeated username, realm, nonce, uri, or response parameters otherwise overwrite allocated strings, leaving only the last allocation available for the caller to free. Preserve last-value-wins parsing while reclaiming each previous allocation. Bug: https://nvd.nist.gov/vuln/detail/CVE-2019-7732 Forwarded: no Last-Update: 2026-10-29 --- a/liveMedia/RTSPServer.cpp +++ b/liveMedia/RTSPServer.cpp @@ -1085,14 +1085,19 @@ // Copy values for parameters that we understand: if (strcmp(parameter, "username") == 0) { + delete[] username; username = strDup(value); } else if (strcmp(parameter, "realm") == 0) { + delete[] realm; realm = strDup(value); } else if (strcmp(parameter, "nonce") == 0) { + delete[] nonce; nonce = strDup(value); } else if (strcmp(parameter, "uri") == 0) { + delete[] uri; uri = strDup(value); } else if (strcmp(parameter, "response") == 0) { + delete[] response; response = strDup(value); }