apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1001082 - /apr/apr-util/branches/1.4.x/dbd/apr_dbd_odbc.c
Date Fri, 24 Sep 2010 21:20:53 GMT
Author: trawick
Date: Fri Sep 24 21:20:51 2010
New Revision: 1001082

URL: http://svn.apache.org/viewvc?rev=1001082&view=rev
Log:
merge r1001073 from apr trunk

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

Modified:
    apr/apr-util/branches/1.4.x/dbd/apr_dbd_odbc.c

Modified: apr/apr-util/branches/1.4.x/dbd/apr_dbd_odbc.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/dbd/apr_dbd_odbc.c?rev=1001082&r1=1001081&r2=1001082&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/dbd/apr_dbd_odbc.c (original)
+++ apr/apr-util/branches/1.4.x/dbd/apr_dbd_odbc.c Fri Sep 24 21:20:51 2010
@@ -1323,7 +1323,7 @@ static apr_status_t odbc_datum_get(const
         return APR_ENOENT;          /* SQL NULL value */
     
     if (len < 0)
-        strcpy(data, p);
+       *(char**)data = (char *)p;
     else
         memcpy(data, p, len);
     



Mime
View raw message