pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.05k stars 2.11k forks source link

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

Closed aleks-f closed 3 months ago

aleks-f commented 3 months ago

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

https://github.com/pocoproject/poco/blob/03c2fa3eea16d2716f596bdb0393a5036b819980/Data/ODBC/src/Unicode_WIN32.cpp#L52

https://github.com/pocoproject/poco/blob/03c2fa3eea16d2716f596bdb0393a5036b819980/Data/ODBC/src/ConnectionHandle.cpp#L267-L271

Relevant environment information:

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