From 5871d604cdcc45ab9b51ea2c5684a9cb81622a8a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 6 Aug 2018 09:38:59 +0200 Subject: [PATCH] tests: Use fstat instead of lstat CID 1393878 Signed-off-by: Andreas Schneider --- tests/client/torture_sftp_fsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/client/torture_sftp_fsync.c b/tests/client/torture_sftp_fsync.c index 677bb90d..3e61b0b7 100644 --- a/tests/client/torture_sftp_fsync.c +++ b/tests/client/torture_sftp_fsync.c @@ -98,7 +98,7 @@ static void torture_sftp_fsync(void **state) { fp = fopen(libssh_tmp_file, "r"); assert_non_null(fp); - rc = lstat(libssh_tmp_file, &sb); + rc = fstat(fileno(fp), &sb); assert_return_code(rc, errno); bytesread = fread(buf_verify, sizeof(buf_verify), 1, fp);