summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-07-10 23:51:32 -0700
committerRussell Belfer <rb@github.com>2012-07-10 23:51:32 -0700
commit54e29b9380f1cd0fa596d71c317de907da19b13d (patch)
treebe5745104a5caa78c42c697407ff1d32cfbe5a45 /src/buffer.c
parent991a56c704f931e7eb52a0583e5d8684803f3b04 (diff)
downloadlibgit2-54e29b9380f1cd0fa596d71c317de907da19b13d.tar.gz
Fix missing NUL termination of buffer
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index d16b17160..5d54ee1a5 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -172,6 +172,8 @@ int git_buf_puts_escaped(
}
}
+ buf->ptr[buf->size] = '\0';
+
return 0;
}