Commit 544f4eaa authored by zygzagZ's avatar zygzagZ

Fix check buffer not alloc'd

parent ba72dd16
......@@ -17,6 +17,7 @@ char * readString() {
char *line = NULL;
size_t bufLen = 0;
getline(&line, &bufLen, stdin);
if (!line) error();
size_t len = 0;
while (line[len]) len++;
line[len-1] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment