Add check for minimum buffer size

This commit is contained in:
Khaïs COLIN 2024-10-31 13:48:24 +01:00
parent 1f79bbbb12
commit ff928f6366

View file

@ -19,6 +19,9 @@
# ifndef BUFFER_SIZE
# define BUFFER_SIZE 1024
# endif
# if BUFFER_SIZE <= 1
# error BUFFER_SIZE must be at least 2
# endif
char *get_next_line(int fd);