changeset 17650:a98902bda11a classdef

Fix invalid memory read in rmpath. * libinter/corefcn/load-path.cc (load_path::do_remove): Prevent invalid memory read, process removing the dir_info object before erasing it from the internal list.
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 14 Oct 2013 11:28:29 -0400
parents c702371ff6df
children bb2fa6e5b348
files libinterp/corefcn/load-path.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Sat Oct 05 11:22:09 2013 -0400
+++ b/libinterp/corefcn/load-path.cc	Mon Oct 14 11:28:29 2013 -0400
@@ -898,9 +898,9 @@
 
               dir_info& di = *i;
 
+              remove (di);
+
               dir_info_list.erase (i);
-
-              remove (di);
             }
         }
     }