[or-cvs] r13606: notice an integer overflow if we ever get source files with (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Wed Feb 20 00:46:09 UTC 2008
Author: arma
Date: 2008-02-19 19:46:09 -0500 (Tue, 19 Feb 2008)
New Revision: 13606
Modified:
tor/trunk/src/or/connection.c
Log:
notice an integer overflow if we ever get source files with more
than 65k lines in them. also pointed out by veracode.
Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c 2008-02-20 00:30:41 UTC (rev 13605)
+++ tor/trunk/src/or/connection.c 2008-02-20 00:46:09 UTC (rev 13606)
@@ -600,6 +600,7 @@
{
assert_connection_ok(conn,0);
tor_assert(line);
+ tor_assert(line < 1<<16); /* marked_for_close can only fit a uint16_t. */
tor_assert(file);
if (conn->marked_for_close) {
More information about the tor-commits
mailing list