Detect insanely large circuit build state; don't give its length to rand_int

This commit is contained in:
Nick Mathewson
2011-06-01 12:12:01 -04:00
parent 5afab5ca19
commit 42e4e156d9
2 changed files with 13 additions and 1 deletions
+4
View File
@@ -3,3 +3,7 @@
correctly. Previously, it accepted values up to UINT_MAX, but
could return a negative number if given a value above INT_MAX+1.
Found by George Kadianakis. Fixes bug 3306; bugfix on 0.2.2pre14.
- Avoid a segfault when reading a malformed circuit build state
with more than INT_MAX entries. Found by wanoskarnet. Bugfix on
0.2.2.4-alpha.