mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 06:48:05 +01:00
notice an integer overflow if we ever get source files with more
than 65k lines in them. also pointed out by veracode. svn:r13606
This commit is contained in:
parent
e9474ed28e
commit
0977c29196
1 changed files with 1 additions and 0 deletions
|
@ -600,6 +600,7 @@ _connection_mark_for_close(connection_t *conn, int line, const char *file)
|
||||||
{
|
{
|
||||||
assert_connection_ok(conn,0);
|
assert_connection_ok(conn,0);
|
||||||
tor_assert(line);
|
tor_assert(line);
|
||||||
|
tor_assert(line < 1<<16); /* marked_for_close can only fit a uint16_t. */
|
||||||
tor_assert(file);
|
tor_assert(file);
|
||||||
|
|
||||||
if (conn->marked_for_close) {
|
if (conn->marked_for_close) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue