Commit fac08837a50993be4d8fa023c8fc13408180ecc1

Edward Thomson 2019-01-21T11:38:46

filter: return an int Validate that the return value of the read is not less than INT_MAX, then cast.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/filter.c b/src/filter.c
index 4c9c741..33ddfe2 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -974,7 +974,7 @@ int git_filter_list_stream_file(
 	}
 
 	if (readlen < 0)
-		error = readlen;
+		error = -1;
 
 done:
 	if (initialized)