Skip to content

Commit

Permalink
Increased recieve buffer size to match to native recieve buffer size …
Browse files Browse the repository at this point in the history
…to avoid heap corruption issue
  • Loading branch information
Kaur-Parminder committed Feb 7, 2022
1 parent 8374240 commit d629a1c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal static DataTable GetDataSources()
char[] buffer = null;
StringBuilder strbldr = new StringBuilder();

Int32 bufferSize = 1024;
Int32 bufferSize = 65536;
Int32 readLength = 0;
buffer = new char[bufferSize];
bool more = true;
Expand All @@ -58,7 +58,7 @@ internal static DataTable GetDataSources()
if (handle != ADP.s_ptrZero)
{
while (more && !TdsParserStaticMethods.TimeoutHasExpired(timeoutTime))
{
{
#if NETFRAMEWORK
readLength = SNINativeMethodWrapper.SNIServerEnumRead(handle, buffer, bufferSize, out more);
#else
Expand Down

0 comments on commit d629a1c

Please sign in to comment.