helpThe oSIP library - Support: sr #103632, osip_message_to_str produces...

 
 

sr #103632: osip_message_to_str produces string with garbage appended

Submitted by:  Heiko Bennewitz <heiko>
Submitted on:  Thu 02 Dec 2004 05:06:41 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 2 - MinorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 Dec 2004 05:06:41 PM UTC, original submission:

Doing this:

osip_message_init(&sip);
osip_message_parse2(sip,msg_test1, sizeof(msg_test1));
osip_message_to_str(sip,&buf);
fprintf(stdout,"mess:\n%sHERE THE MESSAGE ENDS\n------<<\n",buf);
osip_message_free(sip);

osip_message_init(&sip);
osip_message_parse2(sip,msg_test2, sizeof(msg_test2));
osip_message_to_str(sip,&buf);
fprintf(stdout,"mess:\n%sHERE THE MESSAGE ENDS\n------<<\n",buf);
osip_message_free(sip);

leads to a correct looking message string (second message),
but is is too long and has some garbage at the end.
Best way to see, is to use less, because the character may be
non printable. I used libosip2-2.0.9. I looked into the code but
could not find something obvious.
I attached an example file that always reproduces the bug on my machine.

p.s. I like your work and use it for my master thesis, which wil be a sip proxy. Other stacks force the software into their architecture, that was the main reason to choose osip.

Heiko Bennewitz <heiko>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #3909:  memorybug.cc added by heiko (2kB - text/x-c++src - an example file that always reproduces the bug on my machine)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Thu 02 Dec 2004 05:06:41 PM UTCheikoAttached File-=>Added memorybug.cc, #88

Back to the top


Powered by Savane 3.1-cleanup