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 43ab5a8 commit a5d43d1Copy full SHA for a5d43d1
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