[PATCH] Fix crash during connect using SSPI auth - Mailing list pgsql-odbc

From Nikhil Deshpande
Subject [PATCH] Fix crash during connect using SSPI auth
Date
Msg-id 53A895EE.9040902@vmware.com
Whole thread Raw
Responses Re: [PATCH] Fix crash during connect using SSPI auth  ("Inoue, Hiroshi" <inoue@tpf.co.jp>)
List pgsql-odbc
Hi,

I ran into a crash in psqlodbc driver on Windows while trying to connect
using SSPI authentication (both client and server are on same Windows
host, using a Windows local account instead of domain account, without
any Kerberos setup).

The crash is due to a NULL pointer dereference in function
extract_extra_attribute_setting(), ci->conn_settings.name was
NULL in caller MakePrincHint():

1741 char *extract_extra_attribute_setting(const pgNAME setting, ...
1742 {
1743         const char *str = GET_NAME(setting);
...
1750         for (cptr = str; *cptr; cptr++)     <-- *cptr crashes

Please see attached stack trace for more details.


With attached patch, connection using SSPI authentication was
successful.

Thanks,
  Nikhil

Attachment

pgsql-odbc by date:

Previous
From: "Inoue, Hiroshi"
Date:
Subject: Re: Non-ASCII DSN name troubles
Next
From: "Inoue, Hiroshi"
Date:
Subject: Re: msdtc with 32-bit app fails to resolve in-doubt or not-notifed transactions