| Commit message (Collapse) | Author | Age |
... | |
|\| |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* It seems parse_http_time wasn't parsing correctly any date with commas (RFCs
1123 and 850). Fix that.
* It seems parse_http_time was reporting the wrong month (they start at 0, not
1). Fix that.
* Add some tests for parse_http_time, covering all three formats.
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
src/common/util.c
src/test/test_util.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The underlying strtoX functions handle overflow by saturating and
setting errno to ERANGE. If the min/max arguments to the
tor_parse_* functions are equal to the minimum/maximum of the
underlying type, then with the old approach, we wouldn't treat a
too-large value as genuinely broken.
Found this while looking at bug 5786; bugfix on 19da1f36 (in Tor
0.0.9), which introduced these functions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They boil down to:
- MS_WINDOWS is dead and replaced with _WIN32, but we let a few
instances creep in when we merged Esteban's tests.
- Capitalizing windows header names confuses mingw.
- #ifdef 0 ain't C.
- One unit test wasn't compiled on windows, but was being listed
anyway.
- One unit test was checking for the wrong value.
Gisle Vanem found and fixed the latter 3 issues.
|
| |
| |
| |
| |
| | |
tor_vsscanf() is supposed to return the current number of matches on
match failure.
|
| |
| |
| |
| |
| |
| |
| |
| | |
One of our unit tests checks that they behave correctly (giving an
error) when the base is negative. But there isn't a guarantee that
strtol and friends actually handle negative bases correctly.
Found by Coverity Scan; fix for CID 504.
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| | |
Previously, malformatted torrc values could crash us.
Patch by Esteban Manchado. Fixes bug 5090; fix on 0.2.0.16-alpha.
|
| |
| |
| |
| |
| | |
This is a backport of bed79c47f4ec0ee72b19e2b81c54131d516d07ef which
accidentally only went into master
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Found by Coverity.
No changes/ file, because this bug has not been in a release yet.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Now tor_spawn_background's prototype is OS-independent.
|
| |
| |
| |
| | |
The envp argument is used on Windows.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
There was one MS_WINDOWS that remained because it wasn't on a macro
line; a few remaining uses (and the definition!) in configure.in;
and a now-nonsensical stanza of eventdns_tor.h that previously
defined 'WIN32' if it didn't exist.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit is completely mechanical; I used this perl script to make it:
#!/usr/bin/perl -w -i.bak -p
if (/^\s*\#/) {
s/MS_WINDOWS/_WIN32/g;
s/\bWIN32\b/_WIN32/g;
}
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes bug 4893.
These changes are pure mechanical, and were generated with this
perl script:
/usr/bin/perl -w -i.bak -p
s/crypto_pk_env_t/crypto_pk_t/g;
s/crypto_dh_env_t/crypto_dh_t/g;
s/crypto_cipher_env_t/crypto_cipher_t/g;
s/crypto_digest_env_t/crypto_digest_t/g;
s/aes_free_cipher/aes_cipher_free/g;
s/crypto_free_cipher_env/crypto_cipher_free/g;
s/crypto_free_digest_env/crypto_digest_free/g;
s/crypto_free_pk_env/crypto_pk_free/g;
s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g;
s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g;
s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g;
s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g;
s/crypto_new_cipher_env/crypto_cipher_new/g;
s/crypto_new_digest_env/crypto_digest_new/g;
s/crypto_new_digest256_env/crypto_digest256_new/g;
s/crypto_new_pk_env/crypto_pk_new/g;
s/crypto_create_crypto_env/crypto_cipher_new/g;
s/connection_create_listener/connection_listener_new/g;
s/smartlist_create/smartlist_new/g;
s/transport_create/transport_new/g;
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These were found by looking for tor_snprintf() instances that were
preceeded closely by tor_malloc(), though I probably converted some
more snprintfs as well.
(In every case, make sure that the length variable (if any) is
removed, renamed, or lowered, so that anything else that might have
assumed a longer buffer doesn't exist.)
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
src/or/rendclient.c
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This re-applies a check-spaces fix that was part of
7920ea55b8d994268d2b07f27316b0f34d8f27e5 and got reverted along with the
rest of that commit in df1f72329acf5f555618a5309f2621e584c0d763.
|
| | |
| | |
| | |
| | | |
This reverts commit 7920ea55b8d994268d2b07f27316b0f34d8f27e5.
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | | |
Introduce write_bytes_to_new_file(), a function which writes bytes to
a file only if that file did not exist.
|
| | |
| | |
| | |
| | |
| | | |
This version avoids the timeout system entirely, gives a nicer
interface, and lets us manage allocation explicitly.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Let's *not* expose more cross-platform-compatibility structures, or
expect code to use them right.
Also, don't fclose() stdout_handle and stdin_handle until we do
tor_process_handle_destroy, or we risk a double-fclose.
|
|\ \ \
| |/ /
|/| | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add a tor_process_get_pid() function that returns the PID of a
process_handle_t.
- Conform to make check-spaces.
- Add some more documentation.
- Improve some log messages.
|
| | |
| | |
| | |
| | | |
Also, create tor_process_destroy() which destroys a process_handle_t.
|
|/ / |
|
| | |
|
| |
| |
| |
| | |
My fault; fix for bug 4213.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/common/util.c
src/common/util.h
src/or/config.h
src/or/main.c
src/test/test_util.c
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Transform our logging severities to something more sensible.
Remove sneaky printf()s.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Introduce string_is_C_identifier() and use it to enforce transport
names according to the 180 spec.
|