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: AANLkTimDAOJPSebul0QtosTbxH-21aM2Xmwyae7uHRyC@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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
pointer).

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.

Thanks!

Attachment Content-Type Size
info.c.allow_public_schema.nullcheck.patch application/octet-stream 760 bytes

Browse pgsql-odbc by date

  From Date Subject
Next Message Simeó Reig 2010-06-14 10:51:34 Possible Bug in ODBC win driver
Previous Message adishesh machetty 2010-06-09 08:52:44 unixODBC version