Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2005

Tip: Looking for answers? Try searching our database.

Buffer overrun bug  in ATL CPath functions.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Hensley - 10 May 2005 04:40 GMT
There are a couple of bugs in the atlpath.h file that ships with
DevStudio 2003 and DevStudio 2005 Beta 1 & 2.  These bugs result in
buffer overrun and memory corruption problems. After experiencing some
memory corruption I traced the problems to CPathT::AddBackslash() and
CPathT::Append(). These are offending lines in each of the functions
along with an explanation of what is wrong with them.

void AddBackslash()
{
 ...
 // Buffer will be large enough for the appended backslash but not
 //  the ‘\0’ string terminator
 pszBuffer = m_strPath.GetBuffer( m_strPath.GetLength()+1 );
 ...
}

BOOL Append( __in PCXSTR pszMore )
{
 ...
 // Buffer will be large enough for both strings and the separating
 //  backslash but not the ‘\0’ string terminator
 pszBuffer = m_strPath.GetBuffer( m_strPath.GetLength()

+StringType::StringLength(

pszMore)+1);
 ...
}

It would be great if these 2 problems could be fixed in the Devstudio
2005 RTM.

Regards,
John Hensley
SmartSoft
Carl Daniel [VC++ MVP] - 10 May 2005 05:02 GMT
> There are a couple of bugs in the atlpath.h file that ships with
> DevStudio 2003 and DevStudio 2005 Beta 1 & 2.  These bugs result in
[quoted text clipped - 27 lines]
> It would be great if these 2 problems could be fixed in the Devstudio
> 2005 RTM.

Please post a bug report at http://lab.msdn.microsoft.com/productfeedback/

-cd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.