libgit2/tests/core
Patrick Steinhardt 8a5e7aaecf varint: fix computation for remaining buffer space
When encoding varints to a buffer, we want to remain sure that the
required buffer space does not exceed what is actually available. Our
current check does not do the right thing, though, in that it does not
honor that our `pos` variable counts the position down instead of up. As
such, we will require too much memory for small varints and not enough
memory for big varints.

Fix the issue by correctly calculating the required size as
`(sizeof(varint) - pos)`. Add a test which failed before.
2017-06-06 09:33:53 +02:00
..
array.c Plug a few leaks 2016-03-31 10:41:33 -04:00
bitvec.c Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
buffer.c patch parsing: squash some memory leaks 2016-05-26 13:01:07 -05:00
copy.c git_futils_mkdir_*: make a relative-to-base mkdir 2015-09-17 10:00:35 -04:00
dirent.c diriter: test we can iterate root 2015-09-13 13:52:23 -04:00
encoding.c varint: fix computation for remaining buffer space 2017-06-06 09:33:53 +02:00
env.c sysdir: add failing test for variable substitution 2016-12-18 14:47:27 +00:00
errors.c errors: tighten up git_error_state OOMs a bit more 2015-08-03 19:44:51 -04:00
features.c tests: core::features: only check for HTTPS if it is supported 2017-04-25 10:15:59 +02:00
filebuf.c tests: filebuf: test writing to symlink with absolute paths 2017-03-20 12:14:07 +01:00
ftruncate.c git__getenv: utf-8 aware env reader 2015-07-02 16:35:43 +00:00
futils.c futils: ensure we can write a hidden file 2015-09-08 15:56:50 -04:00
hex.c Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
iconv.c Fixed Xcode 6.1 build warnings 2015-06-15 09:55:12 -07:00
init.c core::init tests: reverse init/shutdown 2016-11-18 16:52:28 +00:00
link.c win32: use NT-prefixed "\\?\" paths 2014-12-16 10:08:43 -06:00
mkdir.c Plug some leaks 2015-09-27 23:32:20 +02:00
oid.c Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
oidmap.c oidmap: remove GIT__USE_OIDMAP macro 2017-02-17 11:41:06 +01:00
opts.c git_libgit2_opts: validate key 2016-02-22 23:07:30 -05:00
path.c path: ensure dirname on Win32 prefix always has a trailing '/' 2017-02-08 12:05:47 +01:00
pool.c Add a new build flag to disable the pool allocator and pass all git_pool_malloc calls straight to git__malloc 2016-01-12 16:08:38 -05:00
posix.c inet_pton: don't assume addr families don't exist 2017-03-22 19:52:38 +00:00
pqueue.c pqueue: resolve possible NULL pointer dereference 2016-10-28 16:19:24 +02:00
rmdir.c Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
sha1.c hash: test for sha1 collision attack detection 2017-03-03 10:50:28 +00:00
sortedcache.c Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
stat.c git_futils_mkdir_*: make a relative-to-base mkdir 2015-09-17 10:00:35 -04:00
stream.c tests: fix core/stream test when built with openssl off 2016-04-06 15:00:32 +02:00
string.c git__tolower: test that some non-ASCII downcasing isn't 2015-05-29 18:16:51 -04:00
strmap.c strmap: remove GIT__USE_STRMAP macro 2017-02-17 11:41:06 +01:00
strtol.c Fixed bug while parsing INT64_MIN 2016-06-29 13:32:18 +05:30
structinit.c stash_apply: provide its own options structure 2015-05-11 14:12:39 -04:00
useragent.c Add get user agent functionality. 2016-07-05 18:10:24 +03:00
vector.c tests: vector: fix memory leak 2016-10-27 11:26:52 +02:00
zstream.c zstream: fail when asked to inflate garbage 2016-05-26 13:01:04 -05:00