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

 
 

sr #103632: osip_message_to_str produces string with garbage appended

Submitter:  Heiko Bennewitz <heiko>
Submitted:  Thu 02 Dec 2004 05:06:41 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  2 - Minor Status:  Invalid
Privacy:  Public Assigned to:  aymeric
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 03 Sep 2016 11:28:52 AM UTC, comment #1: 

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

Aymeric MOIZARD <aymeric>
Group administrator
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 Files:
   
   
Comment:
   

Attached Files
file #3909:  memorybug.cc added by heiko (2KiB - 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
  • -email is unavailable- added by aymeric (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-03 aymeric Open/ClosedOpen Closed
    2016-09-03 aymeric StatusNone Invalid
        Assigned toNone aymeric
    2004-12-02 heiko Attached File- Added memorybug.cc, #88

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code