summaryrefslogtreecommitdiff
path: root/src/udp_wrap.cc
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2014-04-09 17:33:33 -0700
committerTimothy J Fontaine <tjfontaine@gmail.com>2014-06-06 15:07:29 -0700
commit535c7777ac674ba86cf93c44824e07b0e23ea8c4 (patch)
tree3a4ffb376febdee64f8c7567d6e60aede3120901 /src/udp_wrap.cc
parent0da4c671659cfbae12def127b2e94690b9d9b5e1 (diff)
downloadandroid-node-v8-535c7777ac674ba86cf93c44824e07b0e23ea8c4.tar.gz
android-node-v8-535c7777ac674ba86cf93c44824e07b0e23ea8c4.tar.bz2
android-node-v8-535c7777ac674ba86cf93c44824e07b0e23ea8c4.zip
src: replace usage of String::Utf8Value
v8::String::Utf8Value previously could allow invalid surrogates when interpreting values.
Diffstat (limited to 'src/udp_wrap.cc')
-rw-r--r--src/udp_wrap.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index b33f4e881d..31a4e7848f 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -25,6 +25,7 @@
#include "req_wrap.h"
#include "handle_wrap.h"
#include "udp_wrap.h"
+#include "util.h"
#include <stdlib.h>
@@ -160,7 +161,7 @@ Handle<Value> UDPWrap::DoBind(const Arguments& args, int family) {
// bind(ip, port, flags)
assert(args.Length() == 3);
- String::Utf8Value address(args[0]);
+ node::Utf8Value address(args[0]);
const int port = args[1]->Uint32Value();
const int flags = args[2]->Uint32Value();
@@ -219,8 +220,8 @@ Handle<Value> UDPWrap::SetMembership(const Arguments& args,
assert(args.Length() == 2);
- String::Utf8Value address(args[0]);
- String::Utf8Value iface(args[1]);
+ node::Utf8Value address(args[0]);
+ node::Utf8Value iface(args[1]);
const char* iface_cstr = *iface;
if (args[1]->IsUndefined() || args[1]->IsNull()) {
@@ -271,7 +272,7 @@ Handle<Value> UDPWrap::DoSend(const Arguments& args, int family) {
length);
const unsigned short port = args[3]->Uint32Value();
- String::Utf8Value address(args[4]);
+ node::Utf8Value address(args[4]);
switch (family) {
case AF_INET: