Menu

#9 Bad chars in output filenames

trunk
closed
Aex Aey
None
5
2018-05-15
2014-09-05
No

On my system pcapsipdump svn trunk is creating the pcap filename with unprintable characters.

A ls -b (print octal escapes for nongraphic characters) shows the following, notice the the \250, \005, and \170. It appears this happens with all files.

20140905-125947-12013671300-(\250\005K)\177-100ad31045ded7021ebc88ab6c9eec52@209.220.119.17:5060.pcap

I'm not very good with C, but I looked through the source code and didn't notice anything obvious.

Discussion

  • Aex Aey

    Aex Aey - 2014-11-17

    Interesting... ans what are "From" and "To" fields for this call?

     
  • avimar

    avimar - 2015-01-17

    I'm also seeing it for all files:

    20150112-204344-12018362222-<#027Ɠ#036-9358d188-e247145d@10.100.102.2.pcap

    It's just a standard:
    From: Avi Bob Mar sip:1899@sip.fone.com;tag=fb23278c40bf1629o0
    To: sip:12018362222@sip.fone.com

     
  • avimar

    avimar - 2015-01-30

    Hi - any update on this? I'm wondering if it's making cloudfuse go wonky...

     
  • Ricardas

    Ricardas - 2015-09-08

    i see bug here:

    if (get_sip_peername(data,datalen,"To:",caller,sizeof(called))) {
    get_sip_peername(data,datalen,"t:",caller,sizeof(called));
    }

    should be called, not caller:

    if (get_sip_peername(data,datalen,"To:",called,sizeof(called))) {
    get_sip_peername(data,datalen,"t:",called,sizeof(called));
    }

    Also, i hate uninitialized stings :) set those to empty string atleast. I would rather see an empty string instead of random characters that can't be displayed properly.

     
    • Aex Aey

      Aex Aey - 2015-09-08

      caller/called typo was fixed long time ago:
      http://sourceforge.net/p/pcapsipdump/code/68/

      and where do you see uninitialized strings may I ask?

       
      • Aex Aey

        Aex Aey - 2015-09-08
         
  • Aex Aey

    Aex Aey - 2015-09-08
    • status: open --> accepted
    • assigned_to: Aex Aey
     
  • Ricardas

    Ricardas - 2015-09-09

    I'm talking about these strings:

    char caller[256];
    char called[256];
    char sip_method[256];

    why not just initialize them to empty strings? For example char caller[256] = ""; Is there any reason not to do so? In case of bugs (like this one) they will be empty instead of pointers to who knows where.

     

    Last edit: Ricardas 2015-09-09
    • Aex Aey

      Aex Aey - 2015-09-09

      Good point. Added in [r95], thanks!

       

      Related

      Commit: [r95]

  • Aex Aey

    Aex Aey - 2015-09-26
    • status: accepted --> closed
     

Log in to post a comment.

Auth0 Logo