Nick Mathewson
53ecfba284
Merge remote-tracking branch 'teor/fix-typos'
2015-01-10 16:00:12 -05:00
teor
5ac26cb7c7
Fix a minor misspelling in util.c
2015-01-10 15:52:55 +11:00
Nick Mathewson
cb54cd6745
Merge branch 'bug9286_v3_squashed'
2015-01-07 10:06:50 -05:00
Nick Mathewson
7984fc1531
Stop accepting milliseconds in various directory contexts
...
Have clients and authorities both have new behavior, since the
fix for bug 11243 has gone in. But make clients still accept
accept old bogus HSDir descriptors, to avoid fingerprinting trickery.
Fixes bug 9286.
2015-01-07 10:05:55 -05:00
Nick Mathewson
f54e54b0b4
Bump copyright dates to 2015, in case someday this matters.
2015-01-02 14:27:39 -05:00
Nick Mathewson
0965bbd5ac
Merge remote-tracking branch 'origin/maint-0.2.5'
2014-12-22 16:02:47 -05:00
Nick Mathewson
6d728ba880
Merge remote-tracking branch 'public/bug14013_024' into maint-0.2.5
2014-12-22 15:58:49 -05:00
Nick Mathewson
47760c7ba5
When decoding a base-{16,32,64} value, clear the target buffer first
...
This is a good idea in case the caller stupidly doesn't check the
return value from baseX_decode(), and as a workaround for the
current inconsistent API of base16_decode.
Prevents any fallout from bug 14013.
2014-12-22 12:56:35 -05:00
Karsten Loesing
7cd53b75c1
Add better support to obfuscate statistics.
2014-12-10 11:16:26 +01:00
Nick Mathewson
8f645befba
11291: Fix warnings, add changes file, rename 'mask'.
2014-11-05 14:12:18 -05:00
Nick Mathewson
4df419a4b1
Merge remote-tracking branch 'meejah/ticket-11291-extra-utests'
...
Conflicts:
src/or/config.c
2014-11-05 14:11:47 -05:00
Nick Mathewson
60c86a3b79
Merge branch 'bug13315_squashed'
...
Conflicts:
src/or/buffers.c
2014-11-04 00:48:25 -05:00
Nick Mathewson
74cbd8d559
fix indentation
2014-11-04 00:46:32 -05:00
Nick Mathewson
254ab5a8de
Use correct argument types for inet_pton.
...
(I blame whoever decided that using a void* for a union was a good
idea.)
2014-11-04 00:45:14 -05:00
rl1987
0da4ddda4f
Checking if FQDN is actually IPv6 address string and handling that case.
2014-11-04 00:37:24 -05:00
rl1987
2f1068e68a
Adding helper function that checks if string is a valid IPv6 address.
2014-11-04 00:37:21 -05:00
rl1987
e8e45ff13e
Introducing helper function to validate IPv4 address strings.
2014-11-04 00:36:37 -05:00
rl1987
1ea9a6fd72
Introducing helper function to validate DNS name strings.
2014-11-04 00:35:43 -05:00
Nick Mathewson
a142fc29af
Use tor_malloc_zero(x), not tor_calloc(x,sizeof(char))
...
(Also, fixes a wide line.)
2014-11-02 12:08:51 -05:00
Nick Mathewson
bbd8d07167
Apply new calloc coccinelle patch
2014-11-02 11:56:02 -05:00
Nick Mathewson
ded33cb2c7
Use the | trick to save a comparison in our calloc check.
2014-11-02 11:54:42 -05:00
Nick Mathewson
0d8abf5365
Switch to a < comparison for our calloc check; explain how it works
2014-11-02 11:54:42 -05:00
Mansour Moufid
81b452d245
Document the calloc function overflow check.
2014-11-02 11:54:42 -05:00
Mansour Moufid
06b1ef7b76
Remove a duplicate comment.
2014-11-02 11:54:42 -05:00
Mansour Moufid
3206dbdce1
Refactor the tor_reallocarray_ overflow check.
2014-11-02 11:54:42 -05:00
Mansour Moufid
aff6fa0b59
Refactor the tor_calloc_ overflow check.
2014-11-02 11:54:41 -05:00
Nick Mathewson
fcdcb377a4
Add another year to our copyright dates.
...
Because in 95 years, we or our successors will surely care about
enforcing the BSD license terms on this code. Right?
2014-10-28 15:30:16 -04:00
teor
238b8eaa60
Improve date validation in HTTP headers
...
Check all date/time values passed to tor_timegm
and parse_rfc1123_time for validity, taking leap
years into account.
Improves HTTP header validation.
Avoid unlikely signed integer overflow in tor_timegm
on systems with 32-bit time_t.
Fixes bug 13476.
2014-10-20 02:40:27 +11:00
Nick Mathewson
f1782d9c4c
Clean whitespace in last patch.
2014-10-13 13:20:07 -04:00
teor
f51418aabc
Avoid overflow in format_time_interval, create unit tests
...
Fix an instance of integer overflow in format_time_interval() when
taking the absolute value of the supplied signed interval value.
Fixes bug 13393.
Create unit tests for format_time_interval().
2014-10-12 20:50:10 +11:00
Nick Mathewson
48558ed1aa
Merge remote-tracking branch 'public/bug13104_025'
2014-09-11 00:11:26 -04:00
Nick Mathewson
284cc9a224
Avoid an overflow on negation in format_helper_exit_status
...
Part of 13104; patch from teor.
2014-09-11 00:00:13 -04:00
Nick Mathewson
d2463c0cfe
Avoid overflows and underflows in sscanf and friends
...
(Patch from teor on 13104)
2014-09-10 23:57:31 -04:00
Nick Mathewson
1eea7a68ed
Use S?SIZE_MAX, not S?SIZE_T_MAX
...
This fixes bug 13102 (not on any released Tor) where using the
standard SSIZE_MAX name broke mingw64, and we didn't realize.
I did this with
perl -i -pe 's/SIZE_T_MAX/SIZE_MAX/' src/*/*.[ch] src/*/*/*.[ch]
2014-09-09 12:08:03 -04:00
David Stainton
b59fd2efb6
Fix permissions logic
2014-09-04 22:21:30 +00:00
David Stainton
59e052b896
Remove HiddenServiceDirGroupReadable from or_options_t
...
...and also fix whitespace.
2014-09-03 17:22:15 +00:00
David Stainton
7203040835
Fix regression nickm pointed out
2014-09-03 03:53:32 +00:00
David Stainton
6e4efb559d
Fix white space
2014-09-02 18:08:57 +00:00
Nick Mathewson
9b850f9200
Add more assertions to esc_for_log to please the clangalyzer.
2014-09-02 13:29:45 -04:00
Nick Mathewson
07a16b3372
Add an assertion to read_file_to_str_until_eof
...
The clangalyzer doesn't believe our math here. I'm pretty sure our
math is right. Also, add some unit tests.
2014-09-02 13:29:11 -04:00
Nick Mathewson
57c48bf734
Apply the MALLOC_ZERO_WORKS fixup to tor_realloc as well.
...
Also, make MALLOC_ZERO_WORKS never get applied when clang analyzer is
running. This should make the clangalyzer a little happier.
2014-09-02 12:55:20 -04:00
David Stainton
6b9016fe3c
Correct check_private_dir's dir mode
...
This commit attempts to satisfy nickm's comment on check_private_dir() permissions:
https://trac.torproject.org/projects/tor/ticket/11291#comment:12
"""check_private_dir() ensures that the directory has bits 0700 if CPD_CHECK_MODE_ONLY is not set. Shouldn't it also ensure that the directory has bits 0050 if CPD_CHECK_MODE_ONLY is not set, and CPD_GROUP_READ is set?"""
2014-08-30 15:23:05 -06:00
David Stainton
227b65924b
Clean up patch
...
Here I clean up anon's patch with a few of nickm's suggestions from comment 12:
https://trac.torproject.org/projects/tor/ticket/11291#comment:12
I did not yet completely implement all his suggestions.
2014-08-30 15:23:05 -06:00
anonymous
c13db1f614
Ticket #11291 : patch from "anon":
...
test-11291-group-redable-hsdirs-wtests-may8.patch
2014-08-30 15:23:05 -06:00
Nick Mathewson
0de7565dfd
Check return values for fcntl in tor_spawn_background.
...
[CID 718609]
2014-08-21 10:38:19 -04:00
Nick Mathewson
4570805efd
Fix whitespace issues
2014-08-13 10:42:20 -04:00
Nick Mathewson
2bfd92d0d1
Apply coccinelle script to replace malloc(a*b)->calloc(a,b)
2014-08-13 10:39:56 -04:00
Nick Mathewson
19b137bc05
Add reallocarray clone so we can stop doing multiply-then-reallocate
2014-08-13 10:39:56 -04:00
Nick Mathewson
5b4ee475aa
Remove code for Windows CE support
...
As far as I know, nobody has used this in ages. It would be a
pretty big surprise if it had worked.
Closes ticket 11446.
2014-06-20 09:49:36 -04:00
Nick Mathewson
a7cafb1ea9
Merge branch 'bug8746_v2_squashed'
...
Conflicts:
src/common/include.am
2014-06-14 11:46:38 -04:00