diff --git a/c-programming/io/pure_getline.c b/c-programming/io/pure_getline.c index a7e750c..6017263 100644 --- a/c-programming/io/pure_getline.c +++ b/c-programming/io/pure_getline.c @@ -17,6 +17,11 @@ bool pure_getline(char** output) { * false: an error occurred, see errno */ + if (output == NULL) { + errno = EINVAL; + return false; + } + char* line = NULL; size_t len = 0; int character;