[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Changes file for 19063; use the BUG macro
commit 1160ac1283a076acc6c660827ebeb84a111f27cc
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Sun Jun 19 12:38:15 2016 -0400
Changes file for 19063; use the BUG macro
---
changes/bug19063 | 4 ++++
src/common/util.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/changes/bug19063 b/changes/bug19063
new file mode 100644
index 0000000..1002009
--- /dev/null
+++ b/changes/bug19063
@@ -0,0 +1,4 @@
+ o Minor features (code safety):
+ - In our integer-parsing functions, check that the maxiumum
+ value given is no smaller than the minimum value. Closes ticket
+ 19063; patch from U+039b.
diff --git a/src/common/util.c b/src/common/util.c
index 97a7e72..4b6df81 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1112,7 +1112,7 @@ tor_digest256_is_zero(const char *digest)
if (!next && *endptr) \
goto err; \
/* Illogical (max, min) inputs? */ \
- if (max < min) \
+ if (BUG(max < min)) \
goto err; \
/* Is r within limits? */ \
if (r < min || r > max) \
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits