[tor-commits] [stem/master] Descriptor reader hung if malformed content was in an archive
atagar at torproject.org
atagar at torproject.org
Fri Nov 30 02:58:08 UTC 2012
commit 69c55aba4146861d0adead57850bea8fa9ded3ea
Author: Damian Johnson <atagar at torproject.org>
Date: Thu Nov 29 18:55:10 2012 -0800
Descriptor reader hung if malformed content was in an archive
The descriptor reader was missing a catch clause when parsing archives, causing
the reader to die (and callers to hang) if it contained invalidly formed
descriptor data.
Caught by eoinof on...
https://trac.torproject.org/5810
---
stem/descriptor/reader.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/stem/descriptor/reader.py b/stem/descriptor/reader.py
index 5ded34d..76c489d 100644
--- a/stem/descriptor/reader.py
+++ b/stem/descriptor/reader.py
@@ -498,6 +498,8 @@ class DescriptorReader(object):
entry.close()
except TypeError, exc:
self._notify_skip_listeners(target, ParsingFailure(exc))
+ except ValueError, exc:
+ self._notify_skip_listeners(target, ParsingFailure(exc))
except IOError, exc:
self._notify_skip_listeners(target, ReadFailed(exc))
finally:
More information about the tor-commits
mailing list