Re: ODBC: SQLGetDescField returns incorrect length forSQL_DESC_COUNT field of APD - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: ODBC: SQLGetDescField returns incorrect length forSQL_DESC_COUNT field of APD
Date
Msg-id 20190706203114.t74rdgzh3y3x26vt@momjian.us
Whole thread Raw
List pgsql-bugs
On Tue, Jun 18, 2019 at 10:31:17PM +0300, Werewolf wrote:
> 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;'.

I suggest you report this to the ODB  project at
pgsql-odbc@postgresql.org.  See:

    https://odbc.postgresql.org/faq.html#1.6

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



pgsql-bugs by date:

Previous
From: Christoph Berg
Date:
Subject: Re: BUG #15896: pg_upgrade from 10-or-earlier: TRAP: FailedAssertion(»!(metad->btm_version >= 3)«
Next
From: Manuel Rigger
Date:
Subject: VACUUM FULL results in ERROR: integer out of range