Commit graph

3 commits

Author SHA1 Message Date
82da182773
fix: potential buffer overflow caused by missing terminating null byte in t_buffer
This only occurs in specific circumstances where the number of bytes to be added
to a t_buffer via the ft_buffer_push_buf function is exactly equal to the number
of free bytes in the current underlying buffer. This does not occur if the
number of bytes to add to the buffer is smaller than that, since we allocate new
space using ft_calloc.

In these circumstances, since no terminating null byte is added, other code may
read past the end of the buffer, causing a buffer overflow.
2025-04-15 15:17:51 +02:00
0486368a07
buffer: add ft_buffer_to_charptr function 2025-03-11 14:58:13 +01:00
65b57987b5
buffer: add buffer struct and related functions 2025-02-20 15:00:32 +01:00