- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user