- fix: doing strlen(bodybuff) after having free()d it
found by dmalloc memory poisoning - fix: new branch id hash calculation was not working properly (dont check return status in osip_xxx_to_str() functions - the docu does not say anything about them (looks like 0 == success) but better check the returnet string pointer value -> NULL = failed) This resulted in a memory leak an imporper calculated MD5 hash.
This commit is contained in:
parent
fe9beb76d5
commit
230c3d3ffb
13
RELNOTES
13
RELNOTES
@ -1,4 +1,4 @@
|
||||
Release Notes for siproxd-0.5.1
|
||||
Release Notes for siproxd-0.5.2
|
||||
===============================
|
||||
|
||||
Just before my vacations I'll make another release. Some new features
|
||||
@ -89,16 +89,9 @@ distribution I'd be happy to get a short notice.
|
||||
|
||||
|
||||
-----
|
||||
md5sum for siproxd-0.5.1.tar.gz: 7bc01e78ba57aeaf9c83276900917bf5
|
||||
md5sum for siproxd-0.5.2.tar.gz:
|
||||
|
||||
GnuPG signature for siproxd-0.5.1.tar.gz archive:
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.2.1 (GNU/Linux)
|
||||
|
||||
iD8DBQA/5tN7CfzBioe83JQRArf9AJ91kOKXa3T/8xtabc8XHXPgOf2ZmQCgoJll
|
||||
o551Dp/eXpzCWbwaNNeXSnY=
|
||||
=OIi0
|
||||
-----END PGP SIGNATURE-----
|
||||
GnuPG signature for siproxd-0.5.2.tar.gz archive:
|
||||
|
||||
|
||||
GnuPG: pub 1024D/87BCDC94 2000-03-19 Thomas Ries <tries@gmx.net>
|
||||
|
||||
@ -27,6 +27,4 @@
|
||||
simply a suggested value. The actual value is in the response from
|
||||
the registrar.
|
||||
For the definitive description -> RFC3261 section 10.
|
||||
|
||||
* Siproxd does not honor a possibly existing Route header
|
||||
|
||||
|
||||
@ -710,7 +710,6 @@ if (configuration.debuglevel)
|
||||
|
||||
/* include new body */
|
||||
osip_message_set_body(mymsg, bodybuff);
|
||||
osip_free(bodybuff);
|
||||
|
||||
/* free content length resource and include new one*/
|
||||
osip_content_length_free(mymsg->content_length);
|
||||
@ -718,6 +717,9 @@ if (configuration.debuglevel)
|
||||
sprintf(clen,"%i",strlen(bodybuff));
|
||||
sts = osip_message_set_content_length(mymsg, clen);
|
||||
|
||||
/* free old body */
|
||||
osip_free(bodybuff);
|
||||
|
||||
if (configuration.debuglevel)
|
||||
{ /* just dump the buffer */
|
||||
char *tmp, *tmp2;
|
||||
|
||||
@ -794,7 +794,8 @@ int sip_calculate_branch_id (osip_message_t *sip_msg, char *id) {
|
||||
MD5Init(&Md5Ctx);
|
||||
|
||||
/* topmost via */
|
||||
if (osip_via_to_str(via, &tmp)) {
|
||||
osip_via_to_str(via, &tmp);
|
||||
if (tmp) {
|
||||
MD5Update(&Md5Ctx, tmp, strlen(tmp));
|
||||
osip_free(tmp);
|
||||
}
|
||||
@ -813,7 +814,8 @@ int sip_calculate_branch_id (osip_message_t *sip_msg, char *id) {
|
||||
|
||||
/* Call-ID */
|
||||
call_id = osip_message_get_call_id(sip_msg);
|
||||
if (osip_call_id_to_str(call_id, &tmp)) {
|
||||
osip_call_id_to_str(call_id, &tmp);
|
||||
if (tmp) {
|
||||
MD5Update(&Md5Ctx, tmp, strlen(tmp));
|
||||
osip_free(tmp);
|
||||
}
|
||||
@ -825,7 +827,8 @@ int sip_calculate_branch_id (osip_message_t *sip_msg, char *id) {
|
||||
}
|
||||
|
||||
/* Request URI */
|
||||
if (osip_uri_to_str(sip_msg->req_uri, &tmp)) {
|
||||
osip_uri_to_str(sip_msg->req_uri, &tmp);
|
||||
if (tmp) {
|
||||
MD5Update(&Md5Ctx, tmp, strlen(tmp));
|
||||
osip_free(tmp);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user