summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakub Wilk <jwilk@jwilk.net>2017-09-07 01:46:58 +0200
committerGuillem Jover <guillem@debian.org>2017-09-07 11:34:53 +0200
commit0fe059239ea00e6c82830f15a9417889d2789839 (patch)
tree0594dd66108bc26d89eef44a0d02b9cbb2fd537b /lib
parent9844b9425ed9571f72826ca5749b279891232f82 (diff)
downloaddpkg-0fe059239ea00e6c82830f15a9417889d2789839.tar.gz
libdpkg: Fix integer overflow in unit test
Fixes: commit 59f63342b9121b9d941d3dbd09487c953a113f6e Signed-off-by: Guillem Jover <guillem@debian.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/dpkg/t/t-deb-version.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dpkg/t/t-deb-version.c b/lib/dpkg/t/t-deb-version.c
index fef115142..88b94e95e 100644
--- a/lib/dpkg/t/t-deb-version.c
+++ b/lib/dpkg/t/t-deb-version.c
@@ -74,7 +74,7 @@ test_deb_version_parse(void)
test_pass(deb_version_parse(&v, vs) == NULL);
free(vs);
- if (asprintf(&vs, "%ld.0", (long int)(1L + INT_MAX)) < 0)
+ if (asprintf(&vs, "%u.0", 1U + (unsigned int)INT_MAX) < 0)
test_bail("cannot allocate memory for asprintf()");
test_fail(deb_version_parse(&v, vs) == NULL);
free(vs);