summaryrefslogtreecommitdiff
path: root/src/or/buffers.c
AgeCommit message (Collapse)Author
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-01-15Fix another instance of "128" in buffers.c. More bug2330.Nick Mathewson
2011-01-10Pull up more data when parsing socks messagesNick Mathewson
Previously, we only looked at up to 128 bytes. This is a bad idea since socks messages can be at least 256+x bytes long. Now we look at up to 512 bytes; this should be enough for 0.2.2.x to handle all valid SOCKS messages. For 0.2.3.x, we can think about handling trickier cases. Fixes 2330. Bugfix on 0.2.0.16-alpha.
2011-01-03Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-12-15Merge remote branch fix_security_bug_021 into fix_security_bug_022Nick Mathewson
Conflicts: src/common/memarea.c src/or/or.h src/or/rendclient.c
2010-12-15Make payloads into uint8_t.Nick Mathewson
This will avoid some signed/unsigned assignment-related bugs.
2010-11-15Move controller event for socks warning into log_unsafe_socks_warningNick Mathewson
2010-11-15Rate-limit unsafe socks warningSebastian Hahn
Pick 5 seconds as the limit. 5 seconds is a compromise here between making sure the user notices that the bad behaviour is (still) happening and not spamming their log too much needlessly (the log message is pretty long). We also keep warning every time if safesocks is specified, because then the user presumably wants to hear about every blocked instance. (This is based on the original patch by Sebastian, then backported to 0.2.2 and with warnings split into their own function.)
2010-11-12Avoid perma-blocking the controller on bug in shrink_freelistNick Mathewson
In all likelihood, this bug would make Tor assert, but if it doesn't, let's not have two bugs.
2010-11-12Disable logging to control port connections in buf_shrink_freelists.Robert Ransom
If buf_shrink_freelists calls log_warn for some reason, we don't want the log call itself to throw buf_shrink_freelists further off the rails.
2010-11-12Move the original log_info call out of the core of buf_shrink_freelists.Robert Ransom
Sending a log message to a control port can cause Tor to allocate a buffer, thereby changing the length of the freelist behind buf_shrink_freelists's back, thereby causing an assertion to fail. Fixes bug #1125.
2010-11-12Disable logging to control port connections in buf_shrink_freelists.Robert Ransom
If buf_shrink_freelists calls log_warn for some reason, we don't want the log call itself to throw buf_shrink_freelists further off the rails.
2010-11-12Move the original log_info call out of the core of buf_shrink_freelists.Robert Ransom
Sending a log message to a control port can cause Tor to allocate a buffer, thereby changing the length of the freelist behind buf_shrink_freelists's back, thereby causing an assertion to fail. Fixes bug #1125.
2010-09-20A start at a patch for bug 1943 (alignment issues)Roger Dingledine
2010-08-10Make buf_shrink_freelists warn, not crash, when n_to_skip is too highNick Mathewson
This mitigates bug 1125, but doesn't fix its root cause (whatever that is).
2010-07-27Create reasons.hSebastian Hahn
2010-07-27Create control.hSebastian Hahn
2010-07-27Create connection_or.hSebastian Hahn
2010-07-27Create connection_edge.hSebastian Hahn
2010-07-27Create config.hSebastian Hahn
2010-07-27Create buffers.hSebastian Hahn
2010-07-09Rename log.h to torlog.hNick Mathewson
This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
2010-06-07Add option to not warn when getting an IP instead of hostnameSebastian Hahn
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2010-02-27Update Tor Project copyright yearsNick Mathewson
2009-12-15Merge branch 'safelogging2'Nick Mathewson
Conflicts: ChangeLog
2009-12-15Refactor the safe_str_*() API to make more sense.Nick Mathewson
The new rule is: safe_str_X() means "this string is a piece of X information; make it safe to log." safe_str() on its own means "this string is a piece of who-knows-what; make it safe to log".
2009-12-12*_free functions now accept NULLSebastian Hahn
Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary.
2009-12-12Allow SafeLogging to exclude client related informationSebastian Hahn
2009-09-29Include util.h and log.h as relative paths.Nathan Freitas
This shouldn't be necessary, but apparently the Android cross-compiler doesn't respect -I as well as it should. (-I is supposed to add to the *front* of the search path. Android's gcc wrapper apparently likes to add to the end. This is broken, but we need to work around it.)
2009-08-26Merge commit 'public/socks-client'Nick Mathewson
Resolved conflict in: src/or/or.h
2009-07-13fix comments and other typosRoger Dingledine
2009-06-19Move SOCKS reason-decoding switches into reasons.cNick Mathewson
2009-06-19Enable Tor to connect through SOCKS 4/5 proxiesChristopher Davis
Added a sanity check in config.c and a check in directory.c directory_initiate_command_rend() to catch any direct connection attempts when a socks proxy is configured.
2009-05-27Spell-check Tor.Nick Mathewson
2009-05-12Better debugging output for bug 977 case.Nick Mathewson
(Don't crash immediately if we have leftover chunks to free after freeing chunks in a buffer freelist; instead log a debugging message that might help.)
2009-05-04Update copyright to 2009.Karsten Loesing
2009-01-04Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
2008-12-30Remove some code that is #ifdefed out, and that we no longer seem to use, if ↵Nick Mathewson
we ever did. svn:r17827
2008-12-22Fix most DOCDOCs remaining and/or added by redox.Nick Mathewson
svn:r17734
2008-12-18Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this ↵Nick Mathewson
patch. svn:r17686
2008-12-18Remove fixed xxx020s; downgrade unfixed ones.Nick Mathewson
(The unfixed ones are being downgraded to regular XXXs mainly on the rationale that they don't seem to be exploding Tor, and they were apparently not showstoppers for 0.2.0.x-final.) svn:r17682
2008-12-17Use ctags and a python script to find identifiers that are never used ↵Nick Mathewson
anywhere, and remove the ones that we really want gone. svn:r17651
2008-11-12Apparently sparc64 is way more strict about uint16_t access alignment than I ↵Nick Mathewson
had thought: it gave bus errors when messing with var-cell headers. Maybe this patch will fix bug 862. svn:r17262
2008-09-29Patch from mwenge: update TrackHostExits mapping expiry times when the ↵Nick Mathewson
mappings are used, so that they expire a while after their last use, not a while after their creation. svn:r17004
2008-09-14read_to_buf should take an int *error_socket and return it.Roger Dingledine
svn:r16909
2008-09-09Refactor unit test macros and tor_free_all() logic a bit so as to make it ↵Nick Mathewson
easier to free memory on failing tests, in order to suppress scanner warnings and to make dmalloc() usable with tests. svn:r16816
2008-08-08handle ipv6 in socks5 requests.Nick Mathewson
svn:r16476
2008-07-31When a struct ends with char a[1], the size of all earlier members of the ↵Nick Mathewson
struct is _not_ sizeof(st)-1; compilers add alignment. Problem spotted by rovv. Backport candidate. svn:r16302