View Issue Details

IDProjectCategoryView StatusLast Update
0032067LazarusPackagespublic2017-08-07 06:12
ReporterPascal RiekenbergAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSWindowsOS Version10 Pro 64 bit
Product Version1.9 (SVN)Product Build55398 
Target Version1.8Fixed in Version1.8 
Summary0032067: CompareSynEditMarks produces range check error with pointers above 4GB
DescriptionCompareSynEditMarks in SynEditMarks produces range check error with pointers above 4GB if all attributes are equal and "fallback" pointer compare is used.
Patch is attached.
TagsNo tags attached.
Fixed in Revision55606
LazTarget1.8
WidgetsetWin32/Win64
Attached Files
  • syneditmarks.pp.patch (457 bytes)
    Index: syneditmarks.pp
    ===================================================================
    --- syneditmarks.pp	(revision 55404)
    +++ syneditmarks.pp	(working copy)
    @@ -594,7 +594,12 @@
       if Result <> 0 then
         exit;
     
    -  Result := PtrInt(m2) - PtrInt(m1);
    +  if Mark2 > Mark1 then
    +    Result := 1
    +  else if Mark1 > Mark2 then
    +    Result := -1
    +  else
    +    Result := 0;
     end;
     
     procedure TSynEditMarkLine.Sort(PrimaryOrder: TSynEditMarkSortOrder;
    
    syneditmarks.pp.patch (457 bytes)

Activities

Pascal Riekenberg

2017-06-27 10:00

reporter  

syneditmarks.pp.patch (457 bytes)
Index: syneditmarks.pp
===================================================================
--- syneditmarks.pp	(revision 55404)
+++ syneditmarks.pp	(working copy)
@@ -594,7 +594,12 @@
   if Result <> 0 then
     exit;
 
-  Result := PtrInt(m2) - PtrInt(m1);
+  if Mark2 > Mark1 then
+    Result := 1
+  else if Mark1 > Mark2 then
+    Result := -1
+  else
+    Result := 0;
 end;
 
 procedure TSynEditMarkLine.Sort(PrimaryOrder: TSynEditMarkSortOrder;
syneditmarks.pp.patch (457 bytes)

Martin Friebe

2017-07-30 18:58

manager   ~0101994

applied

Pascal Riekenberg

2017-08-07 06:12

reporter   ~0102095

thanks

Issue History

Date Modified Username Field Change
2017-06-27 10:00 Pascal Riekenberg New Issue
2017-06-27 10:00 Pascal Riekenberg File Added: syneditmarks.pp.patch
2017-06-27 14:08 Martin Friebe Assigned To => Martin Friebe
2017-06-27 14:08 Martin Friebe Status new => assigned
2017-07-30 18:58 Martin Friebe Fixed in Revision => 55606
2017-07-30 18:58 Martin Friebe LazTarget => 1.8
2017-07-30 18:58 Martin Friebe Note Added: 0101994
2017-07-30 18:58 Martin Friebe Status assigned => resolved
2017-07-30 18:58 Martin Friebe Fixed in Version => 1.8
2017-07-30 18:58 Martin Friebe Resolution open => fixed
2017-07-30 18:58 Martin Friebe Target Version => 1.8
2017-08-07 06:12 Pascal Riekenberg Note Added: 0102095
2017-08-07 06:12 Pascal Riekenberg Status resolved => closed