summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-05-08 16:01:36 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-05-08 16:02:14 +0200
commit78e831a31c0ad31156457c7068726e3c0e93b266 (patch)
treedd6eb5c5b80c84f03416d8c8460bd20a872ee4ad /src
parent1eb9fc5f336aa1f797aad4b3374bd5acbd31f19d (diff)
downloadnodejs-78e831a31c0ad31156457c7068726e3c0e93b266.tar.gz
nodejs-78e831a31c0ad31156457c7068726e3c0e93b266.tar.bz2
nodejs-78e831a31c0ad31156457c7068726e3c0e93b266.zip
Don't use _snprintf() on Windows, it's not safe.
_snprintf() doesn't zero-terminate the buffer on overflow. Use the hand-rolled version that lives in src/node_internals.h.
Diffstat (limited to 'src')
-rw-r--r--src/node.cc3
-rw-r--r--src/node_crypto.cc1
-rw-r--r--src/node_extensions.cc3
3 files changed, 0 insertions, 7 deletions
diff --git a/src/node.cc b/src/node.cc
index ae5328609..9b0e7cbeb 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -31,9 +31,6 @@
#include <locale.h>
#include <signal.h>
#include <stdio.h>
-#if defined(_MSC_VER)
-#define snprintf _snprintf
-#endif
#include <stdlib.h>
#include <string.h>
#if !defined(_MSC_VER)
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index b99d9b074..134e58800 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -29,7 +29,6 @@
#include <string.h>
#ifdef _MSC_VER
-#define snprintf _snprintf
#define strcasecmp _stricmp
#endif
diff --git a/src/node_extensions.cc b/src/node_extensions.cc
index 7073538b0..bbd8111ed 100644
--- a/src/node_extensions.cc
+++ b/src/node_extensions.cc
@@ -24,9 +24,6 @@
#include "node_version.h"
#include <string.h>
#include <stdio.h>
-#if defined(_MSC_VER)
-#define snprintf _snprintf
-#endif
#undef NODE_EXT_LIST_START
#undef NODE_EXT_LIST_ITEM