diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-01-13 14:36:41 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-01-15 11:49:25 -0500 |
commit | 115782bdbe42e4b3d5cb386d2939a883bc381d12 (patch) | |
tree | facebd78bfcd426d3404999e5237c502fb34ebaa /src/or/config.c | |
parent | a16902b9d4b0a912eb0a252bb945cbeaaa40dacb (diff) | |
download | tor-115782bdbe42e4b3d5cb386d2939a883bc381d12.tar tor-115782bdbe42e4b3d5cb386d2939a883bc381d12.tar.gz |
Fix a heap overflow found by debuger, and make it harder to make that mistake again
Our public key functions assumed that they were always writing into a
large enough buffer. In one case, they weren't.
(Incorporates fixes from sebastian)
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 45f611457..f8cfd29f8 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -5321,7 +5321,8 @@ or_state_save(time_t now) tor_free(state); fname = get_datadir_fname("state"); if (write_str_to_file(fname, contents, 0)<0) { - log_warn(LD_FS, "Unable to write state to file \"%s\"", fname); + log_warn(LD_FS, "Unable to write state to file \"%s\"; " + "will try again later", fname); tor_free(fname); tor_free(contents); return -1; |