#366 encode.hexa fails on high ascii

1.6.x
closed-fixed
core (110)
5
2011-04-07
2011-03-31
No

$du = "sip:91.215.1.1";
xlog("L_WARN", "$du/$dd");
xlog("L_WARN", "$(dd{ip.pton})");
xlog("L_WARN", "$(dd{ip.pton}{s.encode.hexa})");

Expected results:

Mar 31 13:41:26 test opensips[7963]: sip:91.215.1.1/91.215.1.1
Mar 31 13:41:26 test opensips[7963]: [<D7>#001#001
Mar 31 13:41:26 test opensips[7963]: 5bd70101

Actual results:

Mar 31 13:38:06 test opensips[6102]: sip:91.215.1.1/91.215.1.1
Mar 31 13:38:06 test opensips[6102]: [<D7>#001#001
Mar 31 13:38:06 test opensips[6102]: 5b

(*) <D7> is actually \xD7 in the above output

Cause: signedness of char.

Fix: see patch.

Regards,
Walter Doekes
OSSO B.V.

Discussion

  • Bogdan-Andrei Iancu

    Hi Walter,

    Thanks for the report and fix - the patch was uploaded on SVN both trunk and 1.6

    Regards,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> bogdan_iancu
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks