summaryrefslogtreecommitdiff
path: root/dbd/apr_dbd_odbc.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2010-09-24 21:01:14 +0000
committerJeff Trawick <trawick@apache.org>2010-09-24 21:01:14 +0000
commit6fb2ace9f98dae02f2a5a27dc2da9e05327fcfe3 (patch)
tree571cb72e62b84e5acf7d17d88415c153ac3a30a3 /dbd/apr_dbd_odbc.c
parenta2f899fd6f8c561c03836e8e5f4bca9b873693ca (diff)
downloadapr-6fb2ace9f98dae02f2a5a27dc2da9e05327fcfe3.tar.gz
DBD ODBC support: Fix memory corruption using apr_dbd_datum_get() with
several different data types, including APR_DBD_TYPE_TIME. PR: 49645 Submitted by: <kappa psilambda.com> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1001073 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dbd/apr_dbd_odbc.c')
-rw-r--r--dbd/apr_dbd_odbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbd/apr_dbd_odbc.c b/dbd/apr_dbd_odbc.c
index 7d6753bee..f4316cdf3 100644
--- a/dbd/apr_dbd_odbc.c
+++ b/dbd/apr_dbd_odbc.c
@@ -1323,7 +1323,7 @@ static apr_status_t odbc_datum_get(const apr_dbd_row_t * row, int col,
return APR_ENOENT; /* SQL NULL value */
if (len < 0)
- strcpy(data, p);
+ *(char**)data = (char *)p;
else
memcpy(data, p, len);