summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/robust.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-07-25 06:34:48 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-07-25 06:34:48 +0000
commitc1251cdd510402ff24572e187f089c5b87cb7e98 (patch)
treef60a41f4858fe20d7e4a6b4adf122487c2f4c4cf /rdiff-backup/rdiff_backup/robust.py
parent57eaef4da22acb89668e7cc2de724bbe3636c20c (diff)
downloadrdiff-backup-c1251cdd510402ff24572e187f089c5b87cb7e98.tar.gz
Added error checking to middle of file reading, security fix for resuming
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@174 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/robust.py')
-rw-r--r--rdiff-backup/rdiff_backup/robust.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/rdiff-backup/rdiff_backup/robust.py b/rdiff-backup/rdiff_backup/robust.py
index 5e2ee96..1973cc3 100644
--- a/rdiff-backup/rdiff_backup/robust.py
+++ b/rdiff-backup/rdiff_backup/robust.py
@@ -575,7 +575,10 @@ class Resume:
mirror = None
last_index = cls.sym_to_index(increment_sym)
if checkpoint_rp:
- ITR, finalizer = cls.unpickle_checkpoint(checkpoint_rp)
+ result = cls.unpickle_checkpoint(checkpoint_rp)
+ sys.stderr.write("#############" + str(result) + "\n")
+ #ITR, finalizer = cls.unpickle_checkpoint(checkpoint_rp)
+ ITR, finalizer = result
elif mirror_sym:
mirror = 1
last_index = cls.sym_to_index(mirror_sym)
@@ -609,6 +612,7 @@ class Resume:
try: result = cPickle.loads(data)
except cPickle.UnpicklingError:
raise ResumeException("Bad pickle at %s" % (checkpoint_rp.path,))
+ return result
def ResumeCheck(cls):
"""Return relevant ResumeSessionInfo if there's one we should resume