-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4263/
-----------------------------------------------------------

Review request for Asterisk Developers and kmoore.


Bugs: ASTERISK-24619
    https://issues.asterisk.org/jira/browse/ASTERISK-24619


Repository: Asterisk


Description
-------

r413586 introduced changes (amongst others) like:

    -                   out += sprintf(out, "%%%02X", (unsigned char) *ptr);
    +                   out += sprintf(out, "%%%02X", (unsigned) *ptr);

But for high-ascii, that results in lots of FF's, for example:

    printf("%02X\n", (unsigned)("å"[0])); /* "FFFFFFC3" */

This changeset attempt to rectify those by using the 'hh' modifier:

    $ man sprintf | grep hh -A4 | head -n4
       hh     A  following  integer  conversion  corresponds  to a
              signed char or unsigned char argument, or a  follow‐
              ing  n  conversion  corresponds  to  a  pointer to a
              signed char argument.

I also replaced occurrences of 2.2x with 02x. They appear to be equal.


This issue was reported by Stefan27 on IRC.


Diffs
-----

  /branches/1.8/utils/astman.c 429562 
  /branches/1.8/res/res_pktccops.c 429562 
  /branches/1.8/res/res_crypto.c 429562 
  /branches/1.8/pbx/dundi-parser.c 429562 
  /branches/1.8/main/utils.c 429562 
  /branches/1.8/main/netsock.c 429562 
  /branches/1.8/main/manager.c 429562 
  /branches/1.8/main/loader.c 429562 
  /branches/1.8/channels/sig_pri.c 429562 
  /branches/1.8/channels/iax2-parser.c 429562 
  /branches/1.8/channels/chan_sip.c 429562 
  /branches/1.8/channels/chan_misdn.c 429562 
  /branches/1.8/channels/chan_iax2.c 429562 
  /branches/1.8/apps/app_sms.c 429562 
  /branches/1.8/apps/app_getcpeid.c 429562 

Diff: https://reviewboard.asterisk.org/r/4263/diff/


Testing
-------

It compiles with gcc 4.8. Did not test with gcc 4.10 which was
the cause for the r413586 fixes.


Thanks,

wdoekes

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to