]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10128 [mod_v8] This commit removes strlen() in favor of binary safe .length()...
authorNicholas Blasgen <nicholas@blasgen.com>
Thu, 16 Mar 2017 01:15:10 +0000 (01:15 +0000)
committerMike Jerris <mike@jerris.com>
Thu, 30 Mar 2017 15:30:07 +0000 (10:30 -0500)
src/mod/languages/mod_v8/src/fssocket.cpp

index f7af7a96e716df35055611e75f0867d4b925e10f..9d6a6816136864c62a3b5482a855d50db6d6c312 100644 (file)
@@ -140,7 +140,7 @@ JS_SOCKET_FUNCTION_IMPL(Send)
                switch_status_t ret;
                String::Utf8Value str(info[0]);
                const char *buffer = js_safe_str(*str);
-               switch_size_t len = strlen(buffer);
+               switch_size_t len = str.length(); // binary safe version of strlen()
                ret = switch_socket_send(this->_socket, buffer, &len);
 
                if (ret != SWITCH_STATUS_SUCCESS) {