Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /charles/src/

charles
Discussion topic

Back to topic list

CVS update: /charles/src/

Reply

Author matthewjheaney
Full name Matthew Heaney
Date 2005-09-13 06:57:04 PDT
Message User: matthewjheaney
Date: 2005/09/13 06:57:04

Modified:
   charles/src/charles-​maps-sorted-strings-​unbounded.adb

Log:
 The 2-param Element function must check whether Find returns Back before dereferencing the pointer.

File Changes:

Directory: /charles/src/
========================

File [changed]: charles-maps-sorted-​strings-unbounded.ad​b
Url: http://charles.tigri​s.org/source/browse/​charles/src/charles-​maps-sorted-strings-​unbounded.adb?r1=1.2​&r2=1.3
Delta lines: +4 -0
-------------------
--- charles-maps-sorted-​strings-unbounded.ad​b 5 Mar 2004 04:26:30 -0000 1.2
+++ charles-maps-sorted-​strings-unbounded.ad​b 13 Sep 2005 13:57:01 -0000 1.3
@@ -643,6 +643,10 @@
 
       Node : constant Node_Access := Find (Container.Tree, Key);
    begin
+ if Node = Container.Tree.Back then
+ raise Constraint_Error;
+ end if;
+
       return Node.Element;
    end;

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /charles/src/ matthewjheaney Matthew Heaney 2005-09-13 06:57:04 PDT
Messages per page: