[dpkg] 93/192: libdpkg: Fix integer overflow in unit test
Ximin Luo
infinity0 at debian.org
Tue Oct 17 11:04:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 0fe059239ea00e6c82830f15a9417889d2789839
Author: Jakub Wilk <jwilk at jwilk.net>
Date: Thu Sep 7 01:46:58 2017 +0200
libdpkg: Fix integer overflow in unit test
Fixes: commit 59f63342b9121b9d941d3dbd09487c953a113f6e
Signed-off-by: Guillem Jover <guillem at debian.org>
---
lib/dpkg/t/t-deb-version.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dpkg/t/t-deb-version.c b/lib/dpkg/t/t-deb-version.c
index fef1151..88b94e9 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list