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

[tor-commits] [tor/master] Add a comment about CID 1311630 and why we won't worry about it.



commit 53c99cce5ecf1d9df9245fc91f7c11ee73295293
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Sep 1 09:43:37 2015 -0400

    Add a comment about CID 1311630 and why we won't worry about it.
---
 src/ext/ed25519/donna/modm-donna-64bit.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h b/src/ext/ed25519/donna/modm-donna-64bit.h
index b22df2b..012ea9e 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -261,6 +261,10 @@ contract256_slidingwindow_modm(signed char r[256], const bignum256modm s, int wi
 			continue;
 
 		for (b = 1; (b < (soplen - j)) && (b <= 6); b++) {
+			/* XXX Tor: coverity scan says that r[j+b] can
+			 * overflow, but that's not possible: b < (soplen-j)
+			 * guarantees that b + j < soplen, so b+j < 256,
+			 * so the index doesn't overflow. */
 			if ((r[j] + (r[j + b] << b)) <= m) {
 				r[j] += r[j + b] << b;
 				r[j + b] = 0;

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