summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-01-21 11:38:46 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-25 22:47:39 +0000
commitfac08837a50993be4d8fa023c8fc13408180ecc1 (patch)
treed6284a4a351ef84cc6ee7320c33bc31867c4bdbb
parent89bd4ddb33aa04a7f89223a7f0fd4f8123a3463d (diff)
downloadlibgit2-fac08837a50993be4d8fa023c8fc13408180ecc1.tar.gz
filter: return an int
Validate that the return value of the read is not less than INT_MAX, then cast.
-rw-r--r--src/filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filter.c b/src/filter.c
index 4c9c7416b..33ddfe2a5 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)