Package: gvm-libs
Version: 22.14.0-1
Followup-For: Bug #1085979
User: [email protected]
Usertags: origin-ubuntu plucky ubuntu-patch
Control: tags -1 patch ftbfs
Dear Maintainer,
There is a PR open upstream that resolves this issue. Would it be possible to
consider adding it as a patch?
In Ubuntu, the attached patch was applied to achieve the following:
* d/p/Fix-Use-unsigned-long-for-compression-lengths.patch: apply
proposed patch to resolve ftbfs on 32 bit architectures (LP:
#2087813).
Thanks for considering the patch.
-- System Information:
Debian Release: trixie/sid
APT prefers noble-updates
APT policy: (500, 'noble-updates'), (500, 'noble-security'), (500, 'noble'),
(100, 'noble-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.8.0-48-generic (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru
gvm-libs-22.14.0/debian/patches/Fix-Use-unsigned-long-for-compression-lengths.patch
gvm-libs-22.14.0/debian/patches/Fix-Use-unsigned-long-for-compression-lengths.patch
---
gvm-libs-22.14.0/debian/patches/Fix-Use-unsigned-long-for-compression-lengths.patch
1970-01-01 12:00:00.000000000 +1200
+++
gvm-libs-22.14.0/debian/patches/Fix-Use-unsigned-long-for-compression-lengths.patch
2024-11-11 14:57:21.000000000 +1300
@@ -0,0 +1,69 @@
+From 968abdd0f4437225c6608884395947917cfaeadb Mon Sep 17 00:00:00 2001
+From: Matt Mundell <[email protected]>
+Date: Fri, 1 Nov 2024 18:42:00 +0000
+Subject: [PATCH] Fix: Use unsigned long for compression lengths
+Origin:
https://github.com/greenbone/gvm-libs/pull/849/commits/968abdd0f4437225c6608884395947917cfaeadb
+Bug: https://github.com/greenbone/gvm-libs/issues/846
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085979
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gvm-libs/+bug/2087813
+
+Prevents incompatible-pointer-types errors on 32bit architectures.
+---
+ util/compressutils_tests.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/util/compressutils_tests.c
++++ b/util/compressutils_tests.c
+@@ -22,14 +22,14 @@
+ {
+ const char *testdata = "TEST-12345-12345-TEST";
+
+- size_t compressed_len;
++ unsigned long compressed_len;
+ char *compressed =
+ gvm_compress (testdata, strlen (testdata) + 1, &compressed_len);
+ assert_that (compressed_len, is_greater_than (0));
+ assert_that (compressed, is_not_null);
+ assert_that (compressed, is_not_equal_to_string (testdata));
+
+- size_t uncompressed_len;
++ unsigned long uncompressed_len;
+ char *uncompressed =
+ gvm_uncompress (compressed, compressed_len, &uncompressed_len);
+ assert_that (uncompressed_len, is_equal_to (strlen (testdata) + 1));
+@@ -40,7 +40,7 @@
+ {
+ const char *testdata = "TEST-12345-12345-TEST";
+
+- size_t compressed_len;
++ unsigned long compressed_len;
+ char *compressed =
+ gvm_compress_gzipheader (testdata, strlen (testdata) + 1,
&compressed_len);
+ assert_that (compressed_len, is_greater_than (0));
+@@ -51,7 +51,7 @@
+ assert_that (compressed[1], is_equal_to ((char) 0x8b));
+ assert_that (compressed[2], is_equal_to (8));
+
+- size_t uncompressed_len;
++ unsigned long uncompressed_len;
+ char *uncompressed =
+ gvm_uncompress (compressed, compressed_len, &uncompressed_len);
+ assert_that (uncompressed_len, is_equal_to (strlen (testdata) + 1));
+@@ -61,7 +61,7 @@
+ Ensure (compressutils, can_uncompress_using_reader)
+ {
+ const char *testdata = "TEST-12345-12345-TEST";
+- size_t compressed_len;
++ unsigned long compressed_len;
+ char *compressed =
+ gvm_compress_gzipheader (testdata, strlen (testdata) + 1,
&compressed_len);
+
+@@ -83,7 +83,7 @@
+ Ensure (compressutils, can_uncompress_using_fd_reader)
+ {
+ const char *testdata = "TEST-12345-12345-TEST";
+- size_t compressed_len;
++ unsigned long compressed_len;
+ char *compressed =
+ gvm_compress_gzipheader (testdata, strlen (testdata) + 1,
&compressed_len);
+
diff -Nru gvm-libs-22.14.0/debian/patches/series
gvm-libs-22.14.0/debian/patches/series
--- gvm-libs-22.14.0/debian/patches/series 2024-10-24 02:45:36.000000000
+1300
+++ gvm-libs-22.14.0/debian/patches/series 2024-11-11 14:57:21.000000000
+1300
@@ -3,3 +3,4 @@
Add-missing-CFLAGS-gpme.patch
remove-Werror.patch
64-bit-time-t-compat.patch
+Fix-Use-unsigned-long-for-compression-lengths.patch