Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-01-12 09:07:16 +0400
committerRussell Belfer <arrbee@arrbee.com>2012-01-12 11:21:46 +0400
commit1dbcc9fc4e6f5264d5bb46f6d7f744eb4a4063e4 (patch)
treec6ab4917dcb9814569e8c2a7423c0034996c9f9a /src/buffer.c
parent0cfcff5daac50d5a4ba41d5125b108cdfceed832 (diff)
Fix several memory issues
This contains fixes for several issues discovered by MSVC and by valgrind, including some bad data access, some memory leakage (in where certain files were not being successfully added to the cache), and some code simplification.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index b6854258b..c57e4aa1b 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -181,7 +181,7 @@ void git_buf_copy_cstr(char *data, size_t datasize, const git_buf *buf)
{
size_t copylen;
- assert(data && datasize);
+ assert(data && datasize && buf);
data[0] = '\0';