From f4507fca34d3f9fa9b96ef4d5b0eedbd37b0d50f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 19 Feb 2010 17:19:41 +0000 Subject: [PATCH] Bug fix: xorriso -update_r could lead to SIGSEGV if applied to a data file --- xorriso/xorriso_timestamp.h | 2 +- xorriso/xorrisoburn.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 6d40f7b7..d418e145 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.02.18.125019" +#define Xorriso_timestamP "2010.02.19.172125" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index a6d32e4a..9349f3ca 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -8176,15 +8176,18 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job, if(job->prune) no_dive= 1; if(ret>0) { + iso_node_ref(iso_node); /* protect from real disposal */ ret= Xorriso_findi_action(xorriso, job, (IsoDirIter *) boss_iter, boss_mem, - path, dir_path, (IsoNode *) dir_node, depth, + path, dir_path, iso_node, depth, flag&(1|2)); + deleted= (iso_node_get_parent(iso_node) == NULL); /* still in tree ? */ + iso_node_unref(iso_node); /* eventually do real disposal */ if(ret<=0) goto ex; if(xorriso->request_to_abort) {ret= 0; goto ex;} - if(ret==2) { + if(ret==2 || deleted) { /* re-determine dir_node in case it has a new persona */ ret= Xorriso_node_from_path(xorriso, volume, path, &iso_node, 1); if(ret==0) {