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 Dec 2 17:06:41 2004  
 
Category: NonePriority: 5 - Normal
Severity: 2 - MinorStatus: Invalid
Privacy: PublicAssigned to: Aymeric MOIZARD <aymeric>
Open/Closed: ClosedOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat Sep 3 11:28:52 2016, comment #1:

sorry if this hasn't been processed on time.
(cleaning the savannah support requests)

Aymeric MOIZARD <aymeric>
Project AdministratorIn charge of this item.
Thu Dec 2 17:06:41 2004, 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

 

Carbon-Copy List
  • -unavailable- added by aymeric (Posted a comment)
  •  

    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):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Sep 3 11:29:07 2016aymericOpen/ClosedOpen=>Closed
    Sat Sep 3 11:28:52 2016aymericStatusNone=>Invalid
      Assigned toNone=>aymeric
    Thu Dec 2 17:06:41 2004heikoAttached File-=>Added memorybug.cc, #88

    Back to the top


    Powered by Savane 3.1-cleanup