diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-17 10:08:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-07 11:09:38 -0400 |
commit | 1e5683b167a612bf76d4ae9ba508027e0d473e52 (patch) | |
tree | 5bd336b4f17411122c8ddb152324f8c2922d4d6e /changes | |
parent | 99618a9641d02b7b99a79c71517203bb70043515 (diff) | |
download | tor-1e5683b167a612bf76d4ae9ba508027e0d473e52.tar.gz tor-1e5683b167a612bf76d4ae9ba508027e0d473e52.zip |
Be more careful calling wcstombs
The function is not guaranteed to NUL-terminate its output. It
*is*, however, guaranteed not to generate more than two bytes per
multibyte character (plus terminating nul), so the general approach
I'm taking is to try to allocate enough space, AND to manually add a
NUL at the end of each buffer just in case I screwed up the "enough
space" thing.
Fixes bug 5909.
Diffstat (limited to 'changes')
-rw-r--r-- | changes/bug5909 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/changes/bug5909 b/changes/bug5909 new file mode 100644 index 0000000000..61990faefa --- /dev/null +++ b/changes/bug5909 @@ -0,0 +1,5 @@ + o Major bugfixes: + - When building Tor on Windows with -DUNICODE (not default), + ensure that error messages, filenames, and DNS server names are + always NUL-terminated when we convert them to a single-byte + encoding. Fixes bug 5909; bugfix on 0.2.2.16-alpha. |