trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SuJinpei <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1218: [TRAFODION-2725] SQL types are REAL,...
Date Fri, 25 Aug 2017 08:08:35 GMT
GitHub user SuJinpei opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1218

    [TRAFODION-2725] SQL types are REAL, FLOAT, and DOUBLE. Some values are inserted, a stack
overflow occurs when SQLGetData is executed

    root cause: write stack variable out of range.
    unsigned long ODBC::ConvertSQLToC(...., targetLength) {
        ...
        CHAR		cTmpBuf[132];
        ...
        double_to_char (dTmp, FLT_DIG + 1, cTmpBuf, targetLength)  **// when targetLength
> 132, the stack will be broken.** 
        ...
    }
    fixed by:limit the max size to sizeof(cTmpBuf)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SuJinpei/incubator-trafodion trafodion-2725

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1218.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1218
    
----
commit 73548715fd95856d34724bb7c2f4b44e3c3b7f3d
Author: SuJinpei <873118042@qq.com>
Date:   2017-08-25T07:45:19Z

    fix TRAFODION-2725

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message