aboutsummaryrefslogtreecommitdiff
path: root/src/common/torgzip.c
AgeCommit message (Collapse)Author
2015-01-06Merge remote-tracking branch 'public/feature11791'Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-11-17Use smaller zlib objects when under memory pressureNick Mathewson
We add a compression level argument to tor_zlib_new, and use it to determine how much memory to allocate for the zlib object. We use the existing level by default, but shift to smaller levels for small requests when we have been over 3/4 of our memory usage in the past half-hour. Closes ticket 11791.
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-10-22Merge remote-tracking branch 'public/bug11824_v2'Nick Mathewson
2014-09-03Treat Z_BUF_ERROR as TOR_ZLIB_BUF_FULL when finalizing a zlib bufferNick Mathewson
Otherwise, when we're out of input *and* finalizing, we might report TOR_ZLIB_OK erroneously and not finalize the buffer. (I don't believe this can happen in practice, with our code today: write_to_buf_zlib ensures that we are never trying to write into a completely empty buffer, and zlib says "Z_OK" if you give it even one byte to write into.) Fixes bug 11824; bugfix on 0.1.1.23 (06e09cdd47eaa8f7e90ce2).
2014-08-24Whitespace fixesNick Mathewson
2014-08-24Merge branch 'bug11792_1_squashed'Nick Mathewson
Conflicts: src/or/circuitlist.c
2014-08-24Count zlib buffer memory towards OOM totals.Nick Mathewson
Part of 11792. (Uses the zlib-endorsed formula for memory needs for inflate/deflate from "zconf.h".)
2014-05-07Synchronize less frequently when compressing descriptorsNick Mathewson
This may improve our compression ratios. fix for 11787
2013-09-01Added --library-versions flag to print the compile time and runtime versions ↵Kevin Butler
of libevent, openssl and zlib. Partially implements #6384.
2013-01-16Update the copyright date to 201.Nick Mathewson
2012-06-04Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson
2011-09-09Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: configure.in src/or/circuitbuild.c
2011-08-30Fix a compilation issue on older FreeBSDsSebastian Hahn
2011-08-01Initial patch to build Tor with msvc and nmakeNick Mathewson
We'll still need to tweak it so that it looks for includes and libraries somewhere more sensible than "where we happened to find them on Erinn's system"; so that tests and tools get built too; so that it's a bit documented; and so that we actually try running the output. Work done with Erinn Clark.
2011-05-11Merge remote-tracking branch 'public/3122_memcmp_squashed' into ↵Nick Mathewson
bug3122_memcmp_022 Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c
2011-05-11Hand-conversion and audit phase of memcmp transitionNick Mathewson
Here I looked at the results of the automated conversion and cleaned them up as follows: If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I changed it to a fast_memcmp or fast_memeq. Otherwise if there was a tor_memcmp that could turn into a tor_memneq or tor_memeq, I converted it. This wants close attention. [*] I'm erring on the side of caution here, and leaving some things as tor_memcmp that could in my opinion use the data-dependent fast_memcmp variant.
2011-05-11Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson
This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.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-01-15Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
2011-01-15clean up message; explain a magic number in a commentNick Mathewson
2011-01-05Fix a SIZE_T_CEILING check in torgzip.c; noticed by cypherpunksNick Mathewson
2011-01-03Detect and disallow compression bombsNick Mathewson
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-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-25Merge branch 'bug1526-v2'Nick Mathewson
2010-06-22Fix zlib macro brokenness on osx with zlib 1.2.4 and higher.Nick Mathewson
From the code: zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory that nobody will care if the compile outputs a no-such-identifier warning. Sorry, but we like -Werror over here, so I guess we need to define these. I hope that zlib 1.2.6 doesn't break these too. Possible fix for bug 1526.
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-12Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson
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-05-27Spelling fixes in comments and stringsNick Mathewson
2009-05-04Update copyright to 2009.Karsten Loesing
2009-01-13Fix up (I hope) most ot the things that coverity suddenly claimed were ↵Nick Mathewson
REVERSE_INULL. This is what we get for bragging about being down to 0 issues. svn:r18096
2009-01-04Another fun openbsd warning fix. On ioerror's computer at least, they ↵Nick Mathewson
redefined an unsigned field in zlib.h to be signed. I am quite sure this makes me more secure somehow. svn:r17892
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-02-21 r14374@tombo: nickm | 2008-02-21 16:57:39 -0500Nick Mathewson
Fix all remaining shorten-64-to-32 errors in src/common. Some were genuine problems. Many were compatibility errors with libraries (openssl, zlib) that like predate size_t. Partial backport candidate. svn:r13665
2008-02-19 r18208@catbus: nickm | 2008-02-19 17:02:30 -0500Nick Mathewson
Add some checks in torgzip.c to make sure we never overflow size_t there. Also make sure we do not realloc(list,0) in container.c. Backport candidate. svn:r13587
2008-02-07Update some copyright notices: it is now 2008.Nick Mathewson
svn:r13412
2008-01-16 r17639@catbus: nickm | 2008-01-15 19:09:21 -0500Nick Mathewson
Fix some hard to trigger but nonetheless real memory leaks spotted by an anonymous contributor. Needs review. Partial backport candidate. svn:r13147
2007-12-12clean up copyrights, and assign 2007 copyrights to The Tor Project, IncRoger Dingledine
svn:r12786
2007-07-22 r13858@catbus: nickm | 2007-07-22 18:44:02 -0400Nick Mathewson
Fix/note some relatively trivial mem usage issues svn:r10905
2007-02-24doc pedantRoger Dingledine
svn:r9634
2007-02-16 r11826@catbus: nickm | 2007-02-16 14:58:38 -0500Nick Mathewson
Resolve 56 DOCDOC comments. svn:r9594
2007-02-12 r11775@catbus: nickm | 2007-02-12 16:39:09 -0500Nick Mathewson
Update copyright dates. svn:r9570
2007-02-02 r11629@catbus: nickm | 2007-02-02 15:06:17 -0500Nick Mathewson
Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were. Oops. Hey, kids! Fixing some of these could be your first Tor patch! svn:r9477
2006-11-14 r9313@totoro: nickm | 2006-11-13 20:07:41 -0500Nick Mathewson
Try to compile with fewer warnings on irix64's MIPSpro compiler / environment, which apparently believes that: - off_t can be bigger than size_t. - only mean kids assign things they do not subsequently inspect. I don't try to fix the "error" that makes it say: cc-3970 cc: WARNING File = main.c, Line = 1277 conversion from pointer to same-sized integral type (potential portability problem) uintptr_t sig = (uintptr_t)arg; Because really, what can you do about a compiler that claims to be c99 but doesn't understand that void* x = NULL; uintptr_t y = (uintptr_t) x; is safe? svn:r8948
2006-10-09 r8957@totoro: nickm | 2006-10-08 22:35:17 -0400Nick Mathewson
The otherwise regrettable MIPSpro C compiler warns about values set but never used, and about mixing enums and ints; these are good warnings, and so should be fixed. This removes some dead code and some potential bugs. Thanks to pnx. svn:r8664