Skip site navigation (1) Skip section navigation (2)

Patch for C0000005 crash on NULL szSchemaName in allow_public_schema()

From: Peter Crabtree <peter(dot)crabtree(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Patch for C0000005 crash on NULL szSchemaName in allow_public_schema()
Date: 2010-06-09 17:50:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
I've encountered a crash trying to interface Visual FoxPro with
psqlODBC with the ANSI version when getting the structure of a table
without a primary key -- looks like a NULL pointer check was in the
wrong place (strlen() gets called on a not-verified-to-be-non-null

I've attached a patch against the current CVS source.

I can't see any way this would impact the rest of the code, as this
function doesn't call any functions with side-effects, and this code
change only changes behavior of the function when it previously would
have crashed, and as such, I haven't done extensive testing, but I
have verified that this fixes the crash in Visual FoxPro, and it runs
fine in my limited testing.

The official FAQ said this is the place to send patches, but please
let me know if that's wrong, or there's anything else I need to do for
patch acceptance, like adding the issue to a tracker or what have you.


Attachment: info.c.allow_public_schema.nullcheck.patch
Description: application/octet-stream (760 bytes)

pgsql-odbc by date

Next:From: Sime├│ ReigDate: 2010-06-14 10:51:34
Subject: Possible Bug in ODBC win driver
Previous:From: adishesh machettyDate: 2010-06-09 08:52:44
Subject: unixODBC version

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group