You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Buffer.allocUnsafe with randomFillSync is broken in Node.js 15.0.0 #3033
In the new Node.js 15.0.0 the use of Buffer.allocUnsafe gives a zero-filled Buffer, like with Buffer.alloc.
This kind of Buffer can be filled will buf.fill or manipulated by buf.writeUInt8. But it cannot be filled with crypto.randomFillSync(buf). If this is tried, the Buffer keeps its previously content.
By using asynchronous randomFill or still the Sync-one but with Buffer.alloc this problem does not appear.
Activity
richardlau commentedon Oct 20, 2020
Being addressed by nodejs/node#35723. See also reported issue over in nodejs/node#35722
Zabrah commentedon Oct 20, 2020
Oh, ok. Didn't searched there. Thanks for the info.