Print Page | Close Window

GetName() crash in Temp Int Files

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=4629
Printed Date: 22 November 2024 at 1:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GetName() crash in Temp Int Files
Posted By: novastor
Subject: GetName() crash in Temp Int Files
Date Posted: 20 July 2006 at 2:46pm
Hello,

I am using GetName() function to load elements inside a list. However when I am allowing my populatelist function to run on Temporary Internet Files it throws an exception details:

Path: C:\Doc & Settings\..My profile\Local Settings\Temporary Internet Files\

Debug Assertion Failed:
File:.\tcscpy_s.inl
Line: 30

Expression:(L"Buffer is too small" && 0)

Anyone any idea whats going on?

One observation is that this temporary internet folder has a file name that has file name excluding extension definately greater than 260.

Thanks,

Sachin Modak.



Replies:
Posted By: Oleg
Date Posted: 20 July 2006 at 3:39pm
Hi,
GetName() ? What class name?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: novastor
Date Posted: 20 July 2006 at 4:43pm
Hi,
 
Here is what you asked for. It seems that there is a buffer overflow in STRCPY_S()...

BOOL CXTShellPidl::GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, TCHAR* lpFriendlyName)

{

...

if (lpsf->GetDisplayNameOf(lpi, dwFlags, &str) == NOERROR)

{

switch (str.uType)

{

case STRRET_WSTR:

#if defined(_UNICODE)

STRCPY_S(lpFriendlyName, MAX_PATH, str.pOleStr);

#else

::WideCharToMultiByte(CP_ACP, 0, str.pOleStr, -1, lpFriendlyName,

MAX_PATH, NULL, NULL);

...

}

hope this helps.

Sachin Modak.


Posted By: Oleg
Date Posted: 21 July 2006 at 12:33pm
Hello,
 
Hmm.
right, lpFriendlyName has only 255 symbols (MAX_PATH)  we will fix it to replace LPCTSTR lpFriendlyName to CString&
 
Thank you for let us know.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: novastor
Date Posted: 26 July 2006 at 5:15pm

Hello,

What is the ETA for this fix? We have a release scheduled in two weeks and this is a gating issue for us.
 
Thanks,
 
Sachin Modak.


Posted By: Oleg
Date Posted: 27 July 2006 at 10:31am
Hi,
We will release 10.3 on this or next week.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net