FIX: xp_enumgroups Generates an Access Violation when Passed a Large Parameter

Article translations Article translations
Article ID: 294338 - View products that this article applies to.
This article was previously published under Q294338
BUG #: 351927 (SHILOH_BUGS)
Expand all | Collapse all

SYMPTOMS

xp_enumgroups provides a list of local Microsoft Windows NT groups or a list of global groups defined in a specified Windows NT domain, provided by the parameter.

If a large parameter is passed to the xp_enumgroups stored procedure, an Access Violation is generated, and the connection terminates with the error messages that follow:
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 53 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

ODBC: Msg 0, Level 20, State 1
Stored function 'xp_enumgroups' in the library 'xplog70.dll' generated an access violation. SQL Server is terminating process 53.

Connection Broken
If the size of the string passed in as a parameter is much larger the access violation stops the SQL Server service. The error message that occurs is similar to:
[Microsoft][ODBC SQL Server Driver][DBMSLPCN]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.

RESOLUTION

To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

STATUS

Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.

MORE INFORMATION

This problem only occurs if the size of the string that is called by xp_enumgroups is larger than 228 bytes. The exact text of the error message can vary depending on the size of the string being passed.

For example, if the string is 229 bytes, this error message displays:
Server: Msg 3624, Level 20, State 1, Procedure xp_enumgroups, Line 1

Location: dbccdll.cpp:516
Expression: pElem == Lookup (pElem->m_DLLName.m_str)
SPID: 51
Process ID: 768

Connection Broken
Steps to Reproduce Behavior

You can use the following to reproduce the problem.

  • To cause an Access Violation to occur, use this code:
    xp_enumgroups 'Scanning directory [C:\*]
    Scanning directory [C:\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\*]
    Scanning directory [C:\cmdcons\*]
    Scanning directory [C:\*]'
    						
  • To cause an Access Violation to occur, and also cause the SQL Server service to stop use this code:
    xp_enumgroups 'Scanning directory [C:\*]
    Scanning directory [C:\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\*]
    Scanning directory [C:\cmdcons\*]
    Scanning directory [C:\*]
    Scanning directory [C:\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\APSETUP\*]
    Scanning directory [C:\*]
    Scanning directory [C:\cmdcons\*]
    Scanning directory [C:\*]'
    						

Properties

Article ID: 294338 - Last Review: November 6, 2003 - Revision: 3.2
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
Keywords: 
kbbug kbfix kbsqlserv2000sp1fix KB294338

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com