Skip to content

Commit b1f4d45

Browse files
committed
[build] Fix UBSan compilation following #3674
1 parent de62d64 commit b1f4d45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/workerd/api/node/buffer.c++

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ uint32_t writeInto(jsg::Lock& js,
104104
kj::Array<uint16_t> tmpBuf = kj::heapArray<uint16_t>(dest.size() / sizeof(uint16_t));
105105
auto result = string.writeInto(js, tmpBuf, flags);
106106
kj::ArrayPtr<uint16_t> buf(reinterpret_cast<uint16_t*>(dest.begin()), result.written);
107-
buf.copyFrom(tmp);
107+
buf.copyFrom(tmpBuf);
108108
#else
109109
kj::ArrayPtr<uint16_t> buf(
110110
reinterpret_cast<uint16_t*>(dest.begin()), dest.size() / sizeof(uint16_t));

0 commit comments

Comments
 (0)