BUG: Pass Invalid LOGINREC * to dbopen() May GP Fault Server

Last reviewed: April 28, 1997
Article ID: Q97718

The information in this article applies to:
  • Microsoft SQL Server Programmer's Toolkit, version 4.2
BUG# OS/2: 1659 (1.11)
       NT:  193 (4.2)

SYMPTOMS

When calling the dbopen() function from a DB-Library client application, SQL Server generates a general protection fault (GP fault).

CAUSE

Passing an invalid pointer as the first parameter to dbopen() may cause the SQL Server to general protection fault (GP fault). If the LOGINREC * points to a random location in memory, or if the LOGINREC * has been freed prior to the call to dbopen() by dbfreelogin(), garbage will be sent to the SQL Server when the client attempts to connect. Although SQL Server may simply reject the login attempt, certain combinations of bad data can cause the server to GP fault.

WORKAROUND

Ensure that all DB-Library code passes a valid LOGINREC * as the first parameter to dbopen().

STATUS

Microsoft has confirmed this to be a problem in version 4.2 of SQL Server. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: dblib db_library trap
Keywords : kbbug4.20 kbprg SSrvDB_Lib SSrvGPF SSrvWinNT
Version : 4.2 4.2a
Platform : MS-DOS OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.