1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-24 19:37:48 +03:00

tests: null terminate buffer in torture_read_one_line()

CID 1393902

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-08-06 08:52:42 +02:00
parent 67ef808a95
commit 1509693cce

View File

@@ -140,6 +140,7 @@ static int torture_read_one_line(const char *filename, char *buffer, size_t len)
fclose(fp);
return -1;
}
buffer[len - 1] = '\0';
fclose(fp);