mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 15:10:02 +00:00
pool: Agh, this test doesn't really apply in 32-bit machines
The size_t is 32-bit already, so it overflows before going into the function. The `-1` test should handle this gracefully in both cases anyway.
This commit is contained in:
parent
437f7d69b2
commit
7a16d54b54
@ -141,9 +141,6 @@ void test_core_pool__strndup_limit(void)
|
||||
cl_git_pass(git_pool_init(&p, 1, 100));
|
||||
/* ensure 64 bit doesn't overflow */
|
||||
cl_assert(git_pool_strndup(&p, "foo", (size_t)-1) == NULL);
|
||||
|
||||
/* ensure 32 bit doesn't overflow */
|
||||
cl_assert(git_pool_strndup(&p, "bar", 0xfffffffful + 32) == NULL);
|
||||
git_pool_clear(&p);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user