[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Descriptor reader hung if malformed content was in an archive



commit 69c55aba4146861d0adead57850bea8fa9ded3ea
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
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:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits