Nick Mathewson
e066966bf4
Extract tor_malloc and friends to a new module.
2018-06-21 15:20:01 -04:00
Nick Mathewson
accf239fa3
Rectify include paths (automated)
2018-06-21 13:19:00 -04:00
Nick Mathewson
fa5fda5bbf
Rectify include paths (automated)
2018-06-21 13:14:14 -04:00
Nick Mathewson
275aff6917
Rectify include paths (automated)
2018-06-21 10:47:11 -04:00
Nick Mathewson
72a5ae8c66
Merge branch 'maint-0.3.4'
2018-06-21 08:38:21 -04:00
Nick Mathewson
8f3712cf6e
eol@eof is still the law in 0.3.4 :(
2018-06-20 19:05:11 -04:00
Nick Mathewson
f24797a587
Merge branch 'maint-0.3.4'
2018-06-20 17:49:56 -04:00
Nick Mathewson
f91ea506f0
Fix clang warnings introduced by 9f2b887c5d
2018-06-20 17:49:06 -04:00
Nick Mathewson
057d838409
Use raw_assert() in write_all().
...
This makes tor_log() finally non-circular.
2018-06-20 16:16:45 -04:00
Nick Mathewson
7a2dce9006
Use raw_assert() in central allocation functions.
...
This is, again, to avoid circularity in the log code.
2018-06-20 16:16:45 -04:00
Nick Mathewson
5ecd1fec15
Move horrible-emergency handling into torerr.[ch]
...
Previously we had code like this for bad things happening from
signal handlers, but it makes sense to use the same logic to handle
cases when something is happening at a level too low for log.c to be
involved.
My raw_assert*() stuff now uses this code.
2018-06-20 15:08:06 -04:00
Nick Mathewson
90aeaa53cd
Remove all use of the assert.h header
...
Nothing in Tor has actually called assert() for some while.
2018-06-20 10:39:07 -04:00
Nick Mathewson
9fa73003fc
Remove dmalloc support; closes #26426
...
Dmalloc hasn't seen a release in over a decade, and there are much
better tools to use these days.
2018-06-20 10:21:34 -04:00
Nick Mathewson
0dab29ce10
Run rectify_include_paths.py
2018-06-20 09:35:05 -04:00
Nick Mathewson
fb0019daf9
Update copyrights to 2018.
2018-06-20 08:13:28 -04:00
rl1987
39bbb8d9cf
Avoid casting smartlist index implicitly
2018-06-04 11:56:37 +03:00
Nick Mathewson
cd3fc2aa48
Merge remote-tracking branch 'neel/b25511-r4'
2018-04-23 09:13:24 -04:00
Neel Chauhan
9e3e1b8bfb
Add format_local_iso_time_nospace()
2018-04-16 20:37:50 -04:00
Mike Perry
0e06a9c3e7
Helper function to add u32 without overflow.
2018-04-16 21:46:31 +00:00
Nick Mathewson
d3b9b5a3dd
Remove windows log_from_handle as unused.
...
This function was only used by PortForwardingHelper, which was
removed in 9df110cd72 . Its presence caused warnings on windows.
2018-04-12 12:38:46 -04:00
Neel Chauhan
9df110cd72
Remove PortForwarding options
...
Signed-off-by: Isis Lovecruft <isis@torproject.org >
2018-04-04 00:19:33 +00:00
Nick Mathewson
6317aa2cc0
Merge branch 'maint-0.3.3'
2018-03-28 07:50:47 -04:00
Nick Mathewson
d4bf1f6c8e
Add a paranoia check in string_is_valid_nonrfc_hostname()
...
The earlier checks in this function should ensure that components is
always nonempty. But in case somebody messes with them in the
future, let's add an extra check to make sure we aren't crashing.
2018-03-28 07:48:18 -04:00
Nick Mathewson
b504c854d3
Rename string_is_valid_hostname -> string_is_valid_nonrfc_hostname
...
Per discussion on 25055.
2018-03-28 07:42:27 -04:00
rl1987
09351c34e9
Don't strlen before checking for NULL
2018-03-28 07:39:03 -04:00
rl1987
a28e350cff
Tweak loop condition
2018-03-28 07:39:03 -04:00
rl1987
6b6d003f43
Don't explode on NULL or empty string
2018-03-28 07:39:03 -04:00
rl1987
ee1fca727c
Simplify hostname validation code
2018-03-28 07:39:03 -04:00
rl1987
dbb7c8e6fd
Validate hostnames with punycode TLDs correctly
2018-03-28 07:39:03 -04:00
rl1987
4413e52f9e
Improve handling of trailing dot
2018-03-28 07:39:03 -04:00
rl1987
6335db9fce
Refrain from including <ctype.h>
2018-03-28 07:39:03 -04:00
rl1987
5986589b48
Call strlen() once
2018-03-28 07:39:03 -04:00
rl1987
b0ba4aa7e9
Fix bracketed IPv6 string validation
2018-03-28 07:39:03 -04:00
rl1987
1af016e96e
Do not consider IP strings valid DNS names. Fixes #25055
2018-03-28 07:39:03 -04:00
rl1987
0e453929d2
Allow IPv6 address strings to be used as hostnames in SOCKS5 requests
2018-03-28 07:39:03 -04:00
Nick Mathewson
0eed0899cd
Merge branch 'bug24658-rm-curve25519-header' into bug24658-merge
2018-03-26 20:12:59 -04:00
Deepesh Pathak
ca6682f3f8
Fix spelling mistakes corresponding to ticket #23650
2018-02-07 10:41:57 -05:00
Fernando Fernandez Mancera
61c7ec29f1
Include crypto_digest.h in order to solve dependency issues.
...
Included crypto_digest.h in some files in order to solve xof+digest module
dependency issues. Removed crypto.h where it isn't needed anymore.
Follows #24658 .
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net >
2018-02-03 17:04:36 +01:00
Nick Mathewson
c92ac9f5cb
Convert the rest of src/common's headers to use FREE_AND_NULL
2017-12-08 14:47:19 -05:00
Nick Mathewson
35746a9ee7
Comment-only change: annotate exit() calls.
...
Sometimes when we call exit(), it's because the process is
completely hopeless: openssl has a broken AES-CTR implementation, or
the clock is in the 1960s, or something like that.
But sometimes, we should return cleanly from tor_main() instead, so
that embedders can keep embedding us and start another Tor process.
I've gone through all the exit() and _exit() calls to annotate them
with "exit ok" or "XXXX bad exit" -- the next step will be to fix
the bad exit()s.
First step towards 23848.
2017-10-19 13:42:28 -04:00
Nick Mathewson
a64d79ca4c
Move around some LCOV_EXCLs in src/common
...
Apparently, my compiler now generates coverage markers for
label-only lines, so we need to exclude those too if they are meant
to be unreachable.
2017-09-28 09:25:17 -04:00
Nick Mathewson
76c33f7ff4
Merge branch 'scan-build-032'
2017-09-15 16:40:11 -04:00
Nick Mathewson
c1deabd3b0
Run our #else/#endif annotator on our source code.
2017-09-15 16:24:44 -04:00
Nick Mathewson
7a597718bb
Split some long #if lines to make the #endif annotator happy
2017-09-15 16:24:21 -04:00
Nick Mathewson
9201e4c74b
Merge branch 'bug23487_029'
2017-09-15 14:27:58 -04:00
Nick Mathewson
75659fd548
Use different variable names for pw_uid usages
...
Catalyst points out that using pw_uid for two different purposes
here is likely to be confusing.
2017-09-15 14:26:59 -04:00
teor
42e7d0ea14
Explain the restrictions on divisor in round*_to_next_multiple_of
...
Closes 23528.
2017-09-15 16:06:17 +10:00
Nick Mathewson
f2f729e26b
Clear up dead-assignment warnings from scan-build
2017-09-12 21:32:34 -04:00
Nick Mathewson
a4847ffa91
clang scan-build: Fix "dead increment" warnings.
...
For the most part, these indicated a spot where the code could have
been better.
2017-09-12 19:03:04 -04:00
Nick Mathewson
7ee486c15f
Log correctly on owner/user mismatch.
...
Found with clang's scan-build while looking at dead assignments.
Fixes bug 23487; bugfix on 1135405c8c in 0.2.9.1-alpha
2017-09-12 17:37:25 -04:00