[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

TortoiseMerge line indexing crash

From: Marshall Greenblatt <marshall_at_smirtware.com>
Date: 2006-02-14 16:52:03 CET

Hi All,

I'm experiencing a crash in the TortoiseMerge CPatch::PatchFile() function
caused by an "lRemoveLine" value that is greater than the number of elements
in the "PatchLines" array. This problem might be a symptom of a larger
issue -- I haven't had the opportunity to delve into it in greater detail --
but the below patch at least keeps the application from crashing. If it
would be helpful I'd be happy to attempt the creation of a small
reproducible test case.

TortoiseSVN version 1.3.1.5521

<< BEGIN PATCH >>

--- Patch-1.cpp 2006-01-16 17:40:42.000000000 -0500
+++ Patch.cpp 2006-02-14 10:38:38.843750000 -0500
@@ -512,7 +512,8 @@
                                 break;
                         case PATCHSTATE_CONTEXT:
                                 {
- if (lAddLine >
PatchLines.GetCount())
+ if (lAddLine > PatchLines.GetCount()
||
+ lRemoveLine >
PatchLines.GetCount())
                                         {
 
m_sErrorMessage.Format(IDS_ERR_PATCH_DOESNOTMATCH, _T(""),
(LPCTSTR)sPatchLine);
                                                 return FALSE;

<< END PATCH >>

Please CC me as I'm not currently on the mailing list.

Regards,

Marshall Greenblatt
SMIRTware, Inc.
28345 Beck Road
Suite 210
Wixom, MI 48393
248-869-4044

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Feb 14 16:58:14 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.