aboutsummaryrefslogtreecommitdiff
path: root/src/or/buffers.c
AgeCommit message (Collapse)Author
2017-09-05Move buffers.c and buffers_tls.c into src/commonNick Mathewson
These are no longer tor-specific, so they can be part of the infrastructure.
2017-09-05Move the tls parts of buffers.c into buffers_tls.cNick Mathewson
2017-09-05Make buffers.c independent of or.hNick Mathewson
Also, put ext_or function in new module; it had accidentally gotten into proto_socks.c
2017-09-05Make buf_pullup() expose the pulled-up data.Nick Mathewson
This lets us drop the testing-only function buf_get_first_chunk_data(), and lets us implement proto_http and proto_socks without looking at buf_t internals.
2017-09-05Move protocol-specific functions out of buffers.cNick Mathewson
This commit does not change the implementation of any function: it only moves code and adds new includes as necessary. Part of #23149.
2017-08-03Switch to offsetof()Neel Chauhan
2017-07-05Make the strings from #1667 static.Nick Mathewson
2017-07-05Merge branch 'neena-fix-1667'Nick Mathewson
2017-07-05Extract "not an HTTP proxy" messages.Nick Mathewson
2017-06-27Merge branch 'maint-0.3.1'Nick Mathewson
2017-06-26Try a little harder to make sure we never call tor_compress_process wrong.Nick Mathewson
2017-06-21Replace peek_buf_startswith() with a safe versionNick Mathewson
It's not okay to assume that the data in a buf_t is contiguous in the first chunk.
2017-06-21Fix compilation on 1667 code.Nick Mathewson
2017-06-21Respond meaningfully to HTTP requests on the control port. Fix #1667Ravi Chandra Padmala
(Squashed with bufferevents portions removed, by nickm)
2017-06-04Use string_is_valid_hostname in SOCKS4 request parsing codepathrl1987
2017-06-04Don't reject SOCKS5 requests that contain IP stringsrl1987
2017-06-03Refrain from needless SOCKS5 warningrl1987
2017-05-30Fix GCC 7 -Wimplicit-fallthrough warningsAndreas Stieger
Add magic comments recognized by default -Wimplicit-fallthrough=3 or break, as required.
2017-05-09config: Remove WarnUnsafeSocks optionDavid Goulet
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-18Rename `write_to_buf_zlib()` to `write_to_buf_compress()`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-17Refactor the streaming compression code.Alexander Færøy
This patch refactors our streaming compression code to allow us to extend it with non-zlib/non-gzip based compression schemas. See https://bugs.torproject.org/21663
2017-03-15Run the copyright update script.Nick Mathewson
2017-02-27Merge branch 'disable_memory_sentinels_squashed'Nick Mathewson
2017-02-27Code to disable memory sentinels for fuzzingNick Mathewson
This feature makes it possible to turn off memory sentinels (like those used for safety in buffers.c and memarea.c) when fuzzing, so that we can catch bugs that they would otherwise prevent.
2017-02-27Merge branch 'bug21369_check_029_squashed' into maint-0.3.0Nick Mathewson
2017-02-27Try to check for (and prevent) buffer size INT_MAX overflow better.Nick Mathewson
Possible fix or diagnostic for 21369.
2017-02-14Merge branch 'bug20894_029_v3'Nick Mathewson
2017-02-14fixup! Don't atoi off the end of a buffer chunk.Nick Mathewson
Use STATIC.
2017-02-14Don't atoi off the end of a buffer chunk.Nick Mathewson
Fixes bug 20894; bugfix on 0.2.0.16-alpha. We already applied a workaround for this as 20834, so no need to freak out (unless you didn't apply 20384 yet).
2016-12-19for fuzzing: Add a function to make a buf with given contentsteor
(Teor wrote the code, nick extracted it into a smaller patch.)
2016-10-17Update the buffer sentinel fix to work with our #20081 fix.Nick Mathewson
2016-10-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-10-17Merge branch 'buf_sentinel_026_v2' into maint-0.2.8Nick Mathewson
2016-10-17Add a one-word sentinel value of 0x0 at the end of each buf_t chunkNick Mathewson
This helps protect against bugs where any part of a buf_t's memory is passed to a function that expects a NUL-terminated input. It also closes TROVE-2016-10-001 (aka bug 20384).
2016-10-17Write a bunch of module documentation.Nick Mathewson
This commit adds or improves the module-level documenation for: buffers.c circuitstats.c command.c connection_edge.c control.c cpuworker.c crypto_curve25519.c crypto_curve25519.h crypto_ed25519.c crypto_format.c dircollate.c dirserv.c dns.c dns_structs.h fp_pair.c geoip.c hibernate.c keypin.c ntmain.c onion.c onion_fast.c onion_ntor.c onion_tap.c periodic.c protover.c protover.h reasons.c rephist.c replaycache.c routerlist.c routerparse.c routerset.c statefile.c status.c tor_main.c workqueue.c In particular, I've tried to explain (for each documented module) what each module does, what's in it, what the big idea is, why it belongs in Tor, and who calls it. In a few cases, I've added TODO notes about refactoring opportunities. I've also renamed an argument, and fixed a few DOCDOC comments.
2016-09-13Make preferred_chunk_size avoid overflow, handle big inputs betterNick Mathewson
Also, add tests for the function. Closes 20081; bugfix on 0.2.0.16-alpha. This is a Guido Vranken issue. Thanks, Guido!
2016-08-12Merge remote-tracking branch 'public/Fix_19450'Nick Mathewson
2016-08-02Remove generic_buffer_*() functions as needless.Nick Mathewson
These functions were there so that we could abstract the differences between evbuffer and buf_t. But with the bufferevent removal, this no longer serves a purpose.
2016-08-02Rename generic_buffer_set_to_copy, since generic buffers are not a thingNick Mathewson
2016-07-19Use coarse monotonic timer instead of cached monotonized libevent time.Nick Mathewson
2016-07-14Remove bufferevents dead codeU+039b
Signed-off-by: U+039b <*@0x39b.fr>
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-04-15Disambiguate: Avoid defining two static functions called chunk_free_uncheckedNick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Make sure that every module in src/or has a brief description.Nick Mathewson
2016-01-12Add another safe_str_client to fix bug 17419Nick Mathewson
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-09-02Remove remaining references to "nulterminate" in commentsNick Mathewson
Thanks to Roger for spotting this!
2015-09-01Remove the unused "nulterminate" option to buf_pullup()Nick Mathewson
I was going to add a test for this, but I realized that it had no users. So, removed.
2015-08-25Log malformed hostnames in socks5 request respecting SafeLoggingAndreas Stieger