Add check for minimum buffer size
This commit is contained in:
parent
1f79bbbb12
commit
ff928f6366
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue