Skip to content

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

@aleks-f

Description

@aleks-f

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions