# HG changeset patch # User Michael Goffioul # Date 1381764509 14400 # Node ID a98902bda11a4514b7b9b0844479bf95b42905fa # Parent c702371ff6df692d02895450e92b9d98c5c92ef9 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. diff -r c702371ff6df -r a98902bda11a libinterp/corefcn/load-path.cc --- 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); } } }