diff options
author | Roger Dingledine <arma@torproject.org> | 2008-02-20 00:46:09 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-02-20 00:46:09 +0000 |
commit | 0977c29196aa73711cbac2a275ba1b84687c94a4 (patch) | |
tree | bf5f68c76f463b8fecf047326fc3de5621bb10ab /src/or/connection.c | |
parent | e9474ed28eb79be92eaa68970ea24c41717cecf5 (diff) | |
download | tor-0977c29196aa73711cbac2a275ba1b84687c94a4.tar.gz tor-0977c29196aa73711cbac2a275ba1b84687c94a4.zip |
notice an integer overflow if we ever get source files with more
than 65k lines in them. also pointed out by veracode.
svn:r13606
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index f7ecdea0fc..5f80872c0f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -600,6 +600,7 @@ _connection_mark_for_close(connection_t *conn, int line, const char *file) { 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) { |