mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-05-31 08:31:41 +05:30
pure_getline.c: do not continue if output is NULL
This commit is contained in:
@@ -17,6 +17,11 @@ bool pure_getline(char** output) {
|
|||||||
* false: an error occurred, see errno
|
* false: an error occurred, see errno
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (output == NULL) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
char* line = NULL;
|
char* line = NULL;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
int character;
|
int character;
|
||||||
|
|||||||
Reference in New Issue
Block a user