提交 67583b8d authored 作者: Nicholas Blasgen's avatar Nicholas Blasgen 提交者: Mike Jerris

FS-10128 [mod_v8] This commit removes strlen() in favor of binary safe .length() function

上级 f00257d4
......@@ -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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论