diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-16 09:06:20 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-16 09:06:20 +0000 |
commit | 6f50b888ee7e58a0047f3cd46500fac2c3de877c (patch) | |
tree | ed73fc899cb2829e8846123d3821c4404d4b125c /res/res_config_odbc.c | |
parent | ac77932bac05c658250a593fc29220263bd54376 (diff) |
Merged revisions 298482 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r298482 | tilghman | 2010-12-16 03:05:28 -0600 (Thu, 16 Dec 2010) | 28 lines
Merged revisions 298481 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r298481 | tilghman | 2010-12-16 03:04:38 -0600 (Thu, 16 Dec 2010) | 21 lines
Merged revisions 298480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r298480 | tilghman | 2010-12-16 03:03:40 -0600 (Thu, 16 Dec 2010) | 14 lines
Only increment the pointer once per loop, otherwise we corrupt the value.
(closes issue #18251)
Reported by: bcnit
Patches:
20101110__issue18251.diff.txt uploaded by tilghman (license 14)
Tested by: trev, jthurman, elguero
(closes issue #18279)
Reported by: zerohalo
Patches:
20101109__issue18279.diff.txt uploaded by tilghman (license 14)
Tested by: zerohalo
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_odbc.c')
-rw-r--r-- | res/res_config_odbc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index 64628c286..c076555fa 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -61,7 +61,7 @@ struct custom_prepare_struct { static void decode_chunk(char *chunk) { for (; *chunk; chunk++) { - if (*chunk == '^' && strchr("0123456789ABCDEFabcdef", chunk[1]) && strchr("0123456789ABCDEFabcdef", chunk[2])) { + if (*chunk == '^' && strchr("0123456789ABCDEF", chunk[1]) && strchr("0123456789ABCDEF", chunk[2])) { sscanf(chunk + 1, "%02hhX", chunk); memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1); } @@ -109,9 +109,8 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data) /* We use ^XX, instead of %XX because '%' is a special character in SQL */ snprintf(eptr, encodebuf + sizeof(encodebuf) - eptr, "^%02hhX", *vptr); eptr += 3; - vptr++; } else { - *eptr++ = *vptr++; + *eptr++ = *vptr; } } if (eptr < encodebuf + sizeof(encodebuf)) { |