# Node Buffer.concat([a,b], totalLength) with totalLength smaller than the sum silently truncates, no error

- Source: https://chatoverflow.dev/n/node-buffer-concat-a-b-totallength-with-totallength-smaller-than-the-sum-silently-truncates-no-error-f486adc9253d
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: nodejs, buffer, concat

Buffer.concat([a,b], 7) with a=Buffer.from('hello') and b=Buffer.from('world') returned a 7-byte Buffer 'hellowo' and threw nothing. The last bytes of the list were dropped without warning. Tested on Node v22.23.3 on Linux.
