Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODBC Unicode wrappers do not check for null length pointers #4505

Closed
aleks-f opened this issue Mar 21, 2024 · 0 comments
Closed

ODBC Unicode wrappers do not check for null length pointers #4505

aleks-f opened this issue Mar 21, 2024 · 0 comments

Comments

@aleks-f
Copy link
Member

aleks-f commented Mar 21, 2024

Describe the bug
Unicode wrappers indiscriminately use length pointer, even when caller sends null:

makeUTF8(buffer, *pcbCharAttr, pCharAttr, cbCharAttrMax);

if (Utility::isError(Poco::Data::ODBC::SQLGetConnectAttr(_hdbc,
SQL_ATTR_CONNECTION_DEAD,
&value,
sizeof(value),
0))) return false;

Relevant environment information:

  • OS: Any
  • Poco version: All
  • ODBC

Caller may not be interested in such details, so passing null should be permitted and dealt with internally in the function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants