-
- Downloads
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.
Showing
- changes/bug5909 5 additions, 0 deletionschanges/bug5909
- src/common/compat.c 16 additions, 7 deletionssrc/common/compat.c
- src/common/util.c 2 additions, 1 deletionsrc/common/util.c
- src/or/config.c 3 additions, 2 deletionssrc/or/config.c
- src/or/eventdns.c 2 additions, 1 deletionsrc/or/eventdns.c
- src/or/ntmain.c 2 additions, 1 deletionsrc/or/ntmain.c
Loading
Please register or sign in to comment