summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorSergey Nikishin <nordsturm@yandex-team.ru>2011-04-24 16:02:57 +0400
committerSergey Nikishin <nordsturm@yandex-team.ru>2011-04-24 18:43:08 +0400
commit411823a3d0614d1268c84bd2add1b65b281ec824 (patch)
treea1158bf5b939d1cd0a5e8310f16f5f0bff467d96 /src/odb.c
parent7c37aa3ac5eecd0e725d0207c0507c4f6836c0eb (diff)
downloadlibgit2-411823a3d0614d1268c84bd2add1b65b281ec824.tar.gz
Fix whole buffer writing in fake wstream
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb.c b/src/odb.c
index 43d0ef9a4..b87f84703 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -170,7 +170,7 @@ static int fake_wstream__write(git_odb_stream *_stream, const char *data, size_t
{
fake_wstream *stream = (fake_wstream *)_stream;
- if (stream->written + len >= stream->size)
+ if (stream->written + len > stream->size)
return GIT_ENOMEM;
memcpy(stream->buffer + stream->written, data, len);