buffer: Null terminate on rtrim
diff --git a/src/buffer.c b/src/buffer.c
index e86246f..68cc393 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -386,4 +386,6 @@ void git_buf_rtrim(git_buf *buf)
buf->size--;
}
+
+ buf->ptr[buf->size] = '\0';
}