pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNT field of APD 2+ messages / 2 participants [nested] [flat]
* Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNT field of APD @ 2019-06-26 16:35 Tom Lane <tgl@sss.pgh.pa.us> 2019-06-27 03:44 ` Re: Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNT field of APD Inoue, Hiroshi <h-inoue@dream.email.ne.jp> 0 siblings, 1 reply; 2+ messages in thread From: Tom Lane @ 2019-06-26 16:35 UTC (permalink / raw) To: pgsql-odbc@lists.postgresql.org; +Cc: Werewolf <werewolfff@yandex.ru> 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=ba0dd6d731bbccd81392def43ae9b... Just replace 'ret = SQL_IS_SMALLINT;' with 'rettype = SQL_IS_SMALLINT;'. ------- End of Forwarded Message ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNT field of APD 2019-06-26 16:35 Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNT field of APD Tom Lane <tgl@sss.pgh.pa.us> @ 2019-06-27 03:44 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp> 0 siblings, 0 replies; 2+ messages in thread From: Inoue, Hiroshi @ 2019-06-27 03:44 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-odbc@lists.postgresql.org, Werewolf <werewolfff@yandex.ru> Hi, On 2019/06/27 1:35, Tom Lane wrote: > 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=ba0dd6d731bbccd81392def43ae9b... > > Just replace 'ret = SQL_IS_SMALLINT;' with 'rettype = SQL_IS_SMALLINT;'. Oops, my mistake. I would commit the fix. thanks. Hiroshi Inoue > > ------- End of Forwarded Message > > > > --- ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-06-27 03:44 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-06-26 16:35 Fwd: ODBC: SQLGetDescField returns incorrect length for SQL_DESC_COUNT field of APD Tom Lane <tgl@sss.pgh.pa.us> 2019-06-27 03:44 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox