--- /dev/null
+ o Minor bugfixes:
+ - Replace all calls to snprintf outside of src/ext with tor_snprintf.
+ Fix for bug 7304.
+ o Code simplification and refactoring:
+ - Remove the #define to replace snprintf with _snprintf on windows;
+ they have different semantics, and all of our callers should be
+ using tor_snprintf anyway. Partial fix for bug 7304.
#include <io.h>
#include <math.h>
#include <projects.h>
-#define snprintf _snprintf
/* this is not exported as W .... */
#define SHGetPathFromIDListW SHGetPathFromIDList
/* wcecompat has vasprintf */
#include <process.h>
#include <direct.h>
#include <windows.h>
-#define snprintf _snprintf
#endif
#ifdef USE_BUFFEREVENTS
if ((size_t)(eol-next) != 9+obname_len+5 ||
strcmp_len(next+9, tok->object_type, obname_len) ||
strcmp_len(eol-5, "-----", 5)) {
- snprintf(ebuf, sizeof(ebuf), "Malformed object: mismatched end tag %s",
+ tor_snprintf(ebuf, sizeof(ebuf), "Malformed object: mismatched end tag %s",
tok->object_type);
ebuf[sizeof(ebuf)-1] = '\0';
RET_ERR(ebuf);