[1538] in Coldmud discussion meeting

root meeting help first previous next last

method_bytecode patch

daemon@ATHENA.MIT.EDU (Tue Jan 18 13:52:15 2000 )

Date: Tue, 18 Jan 2000 13:29:30 -0500
From: Psyclone <psyclone42@geocities.com>
To: coldstuff@cold.org
Reply-To: coldstuff@cold.org

This is a multi-part message in MIME format.
--------------C7D2C4C7707DF3D969BEAB14
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

method_bytecode can return bytecode for methods on ancestors. this is a
slight security problem and is inconsistent with the behavior of
list_method. patch follows.
--------------C7D2C4C7707DF3D969BEAB14
Content-Type: text/plain; charset=us-ascii;
 name="bytecode.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bytecode.patch"

--- Genesis-1.1.8-STABLE/src/ops/object.c	Thu Nov 18 00:28:39 1999
+++ driver-src/src/ops/object.c	Tue Jan 18 13:21:11 2000
@@ -987,7 +987,7 @@
     if (!func_init_1(&args, SYMBOL))
         return;
 
-    method = object_find_method(cur_frame->object->objnum, args[0].u.symbol, FROB_ANY);
+    method = object_find_method_local(cur_frame->object, args[0].u.symbol, FROB_ANY);
 
     /* keep these for later reference, if its already around */
     if (!method)

--------------C7D2C4C7707DF3D969BEAB14--