1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-12-26 11:30:03 +05:30

pure_getline.c: do not continue if output is NULL

This commit is contained in:
Intel A80486DX2-66 2024-04-02 20:41:14 +03:00
parent 514cdf6ee2
commit 43df0e137b
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -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;