We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1e092f commit fb18a18Copy full SHA for fb18a18
test/addons-napi/test_buffer/test_buffer.cc
@@ -44,7 +44,7 @@ void newBuffer(napi_env env, napi_callback_info info) {
44
reinterpret_cast<void**>(&theCopy),
45
&theBuffer));
46
JS_ASSERT(env, theCopy, "Failed to copy static text for newBuffer");
47
- snprintf(theCopy, kBufferSize, "%s", theText);
+ memcpy(theCopy, theText, kBufferSize);
48
NAPI_CALL(env, napi_set_return_value(env, info, theBuffer));
49
}
50
0 commit comments