Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNTfield of APD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNTfield of APD
Дата
Msg-id 9379.1561566937@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Fwd: ODBC: SQLGetDescField returns incorrect length forSQL_DESC_COUNT field of APD  ("Inoue, Hiroshi" <h-inoue@dream.email.ne.jp>)
Список pgsql-odbc
Forwarding to correct list ...

------- Forwarded Message

Date:    Wed, 26 Jun 2019 19:00:58 +0300
From:    Werewolf <werewolfff@yandex.ru>
To:      pgsql-bugs@lists.postgresql.org
Subject: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNT
     field of APD

Field SQL_DESC_COUNT should fit into a variable of type SQLSMALLINT. But
when retrieving this field of APD SQLGetDescField returns SQLINTEGER
value. So memory corruption is possible in application using psqlodbc
driver.
Also the function returns an undefined error code -8.

The mistake is located here

https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=pgapi30.c;h=ba0dd6d731bbccd81392def43ae9b10e9c013aef;hb=HEAD#l1240

Just replace 'ret = SQL_IS_SMALLINT;' with 'rettype = SQL_IS_SMALLINT;'.

------- End of Forwarded Message



В списке pgsql-odbc по дате отправления:

Предыдущее
От: Donovan Hsieh
Дата:
Сообщение: psqlODBC - PostgreSQL ODBC driver error
Следующее
От: "Inoue, Hiroshi"
Дата:
Сообщение: Re: psqlodbc: No memory available to store statement