From: Jason Parker Date: Fri, 27 Aug 2010 20:30:27 +0000 (+0000) Subject: Merged revisions 283880 via svnmerge from X-Git-Tag: 1.6.2.14-rc1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8361949d4b954577ed595d94e2a7e35c7446e44;p=thirdparty%2Fasterisk.git Merged revisions 283880 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r283880 | qwell | 2010-08-27 15:29:11 -0500 (Fri, 27 Aug 2010) | 8 lines Fix issue with decoding ^-escaped characters in realtime. (closes issue #17790) Reported by: denzs Patches: 17790-chunky.diff uploaded by qwell (license 4) Tested by: qwell, denzs ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@283881 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index 90d5c4ea35..ef45bfc999 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -62,7 +62,7 @@ static void decode_chunk(char *chunk) { for (; *chunk; chunk++) { if (*chunk == '^' && strchr("0123456789ABCDEFabcdef", chunk[1]) && strchr("0123456789ABCDEFabcdef", chunk[2])) { - sscanf(chunk + 1, "%02hhd", chunk); + sscanf(chunk + 1, "%02hhX", chunk); memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1); } } diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c index 14146e3304..e58f8adb5f 100644 --- a/res/res_config_pgsql.c +++ b/res/res_config_pgsql.c @@ -296,7 +296,7 @@ static char *decode_chunk(char *chunk) char *orig = chunk; for (; *chunk; chunk++) { if (*chunk == '^' && strchr("0123456789ABCDEFabcdef", chunk[1]) && strchr("0123456789ABCDEFabcdef", chunk[2])) { - sscanf(chunk + 1, "%02hhd", chunk); + sscanf(chunk + 1, "%02hhX", chunk); memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1); } }