summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2011-05-05Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-05-05Fix up some check-spaces issuesNick Mathewson
2011-04-28Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-04-28Correct the logic from f14754fbd for tor_gmtime_rJohn Brooks
2011-04-28Detect and handle NULL returns from (gm/local)time_rNick Mathewson
These functions can return NULL for otherwise-valid values of time_t. Notably, the glibc gmtime manpage says it can return NULL if the year if greater than INT_MAX, and the windows MSDN gmtime page says it can return NULL for negative time_t values. Also, our formatting code is not guaranteed to correctly handle years after 9999 CE. This patch tries to correct this by detecting NULL values from gmtime/localtime_r, and trying to clip them to a reasonable end of the scale. If they are in the middle of the scale, we call it a downright error. Arguably, it's a bug to get out-of-bounds dates like this to begin with. But we've had bugs of this kind in the past, and warning when we see a bug is much kinder than doing a NULL-pointer dereference. Boboper found this one too.
2011-04-27Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-04-27Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/torint.h
2011-04-26Make SIZE_T_CEILING unsigned; add a signed SSIZE_T_CEILINGNick Mathewson
None of the comparisons were _broken_ previously, but avoiding signed/unsigned comparisons makes everybody happier. Fixes bug2475.
2011-04-19Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-04-19Standardize our printf code on %d, not %i.Nick Mathewson
2011-04-08Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/or/rephist.c
2011-04-07Free pending_cb_messages on exitNick Mathewson
2011-04-07Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/address.c src/common/compat_libevent.c src/common/memarea.c src/common/util.h src/or/buffers.c src/or/circuitbuild.c src/or/circuituse.c src/or/connection.c src/or/directory.c src/or/networkstatus.c src/or/or.h src/or/routerlist.c
2011-04-07Merge remote-tracking branch 'public/xxx_fixups' into maint-0.2.2Nick Mathewson
Conflicts: src/or/or.h
2011-03-30Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/compat.h src/or/circuitlist.c src/or/circuituse.c src/or/or.h src/or/rephist.c
2011-03-30Implement replacements for timer(add,cmp,sub) on platforms lacking them.Nick Mathewson
2011-03-28Improve a few commentsSebastian Hahn
2011-03-25Triage the XXX022 and XXX021 comments remaining in the codeNick Mathewson
Remove some, postpone others, leave some alone. Now the only remaining XXX022s are ones that seem important to fix or investigate.
2011-03-25Comment out ancient asserts for bug 930; resolve an xxx021Nick Mathewson
2011-03-25Fixup tor_addr_to_sockaddr return conventionNick Mathewson
2011-03-25Clean up a comment-conversation about bad libevent version/method combosNick Mathewson
2011-03-25Remove the "fuzzy time" codeNick Mathewson
It was the start of a neat idea, but it only got used in 3 places, none of which really needed it.
2011-03-16Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-03-16Resolve the one DOCDOC in the 0.2.2 code atmNick Mathewson
2011-03-16Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/crypto.c
2011-03-16Clean up whitespaceNick Mathewson
2011-03-16Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Trivial Conflicts in src/common/crypto.c src/or/main.h src/or/or.h
2011-03-16Doxygen documentation for about 100 things that didn't have anyNick Mathewson
About 860 doxygen-less things remain in 0.2.2
2011-03-16Fix up all doxygen warnings other than "foo is not documented"Nick Mathewson
2011-03-07Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-03-05Fix setting target port in get_interface_address6Sebastian Hahn
We want to use the discard port correctly, so a htons() was missing. Also we need to set it correctly depending on address family. Review provided by danieldg
2011-03-05Fix connect() failures in get_interface_address6()Sebastian Hahn
The third argument for connect should be dependent on the address family. Issue spotted by piebeer who also wrote the patch.
2011-03-03C style fix: a no-args function is void fn(void), not void fn().Nick Mathewson
2011-03-03Add a magic field to tor_tls_t to catch exdata corruption bugs, if any appear.Nick Mathewson
2011-03-03Check the result of SSL_set_ex_dataRobert Ransom
Reported by piebeer.
2011-03-03Use SSL_*_ex_data instead of SSL_*_app_dataRobert Ransom
SSL_*_app_data uses ex_data index 0, which will be the first one allocated by SSL_get_ex_new_index. Thus, if we ever started using the ex_data feature for some other purpose, or a library linked to Tor ever started using OpenSSL's ex_data feature, Tor would break in spectacular and mysterious ways. Using the SSL_*_ex_data functions directly now may save us from that particular form of breakage in the future. But I would not be surprised if using OpenSSL's ex_data functions at all (directly or not) comes back to bite us on our backends quite hard. The specified behaviour of dup_func in the man page is stupid, and crypto/ex_data.c is a horrific mess.
2011-03-03Remove now-unused helper functionsRobert Ransom
These functions were needed only by code removed in the preceding commit. Reported by mobmix.
2011-03-01remove tls related hash table codeGladys Shufflebottom
2011-02-22Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-02-22Merge branch 'log_domains' into maint-0.2.2Nick Mathewson
2011-02-22That shalt also not have a label without a statement.Nick Mathewson
2011-02-22Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-02-22Initial heartbeat subsystem commit.Sebastian Hahn
Sets: * Documentation * Logging domain * Configuration option * Scheduled event * Makefile It also creates status.c and the log_heartbeat() function. All code was written by Sebastian Hahn. Commit message was written by me (George Kadianakis).
2011-02-11Windows has EACCES, not EACCESSSebastian Hahn
Once again spotted by mobmix Also add a changes file for the fix
2011-02-10Make the DH parameter we use for TLS match the one from Apache's mod_sslNick Mathewson
Our regular DH parameters that we use for circuit and rendezvous crypto are unchanged. This is yet another small step on the path of protocol fingerprinting resistance. (Backport from 0.2.2's 5ed73e3807d90dd0a3)
2011-02-08Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-02-08Locking failures on windows are indicated by EACCESSebastian Hahn
Patch our implementation of tor_lockfile_lock() to handle this case correctly. Also add a note that blocking behaviour differs from windows to *nix. Fixes bug 2504, issue pointed out by mobmix.
2011-02-04Thou shalt not overflow even stupidly small buffersRobert Ransom
2011-02-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-01-25Correctly detect BIO_new failuresNick Mathewson
This bug was noticed by cypherpunks; fixes bug 2378. Bugfix on svn commit r110.