Control: tag -1 patch

Hi,

On Wed, Jul 03, 2024 at 12:33:43PM +0000, Matthias Klose wrote:

[...]
                from tripledes.c:21:
/usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of 
type ‘unsigned char *’
 156 | extern int strcmp (const char *__s1, const char *__s2)
     |                    ~~~~~~~~~~~~^~~~
tripledes.c:841:32: warning: pointer targets in passing argument 2 of ‘strcmp’ 
differ in signedness [-Wpointer-sign]
 841 |         if (strcmp(ciphertext, plaintext) != 0) {
     |                                ^~~~~~~~~
     |                                |
     |                                unsigned char *
/usr/include/string.h:156:50: note: expected ‘const char *’ but argument is of 
type ‘unsigned char *’
 156 | extern int strcmp (const char *__s1, const char *__s2)
     |                                      ~~~~~~~~~~~~^~~~
make[4]: *** [Makefile:804: tripledes.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: link: gcc -shared  -fPIC -DPIC  .libs/3-way.o    -g -O2 
-fstack-protector-strong -Wl,-z -Wl,relro -Wl,-z -Wl,now   -Wl,-soname 
-Wl,threeway.so -o .libs/threeway.so
In file included from /usr/include/string.h:548:
In function ‘memcpy’,
   inlined from ‘safer_sk128_LTX__mcrypt_self_test’ at safer128.c:355:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: warning: 
‘plaintext’ may be used uninitialized [-Wmaybe-uninitialized]
  29 |   return __builtin___memcpy_chk (__dest, __src, __len,
     |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  30 |                                  __glibc_objsize0 (__dest));
     |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
<built-in>: In function ‘safer_sk128_LTX__mcrypt_self_test’:
<built-in>: note: by argument 2 of type ‘const void *’ to 
‘__builtin___memcpy_chk’ declared here
safer128.c:333:23: note: ‘plaintext’ declared here
 333 |         unsigned char plaintext[16];
     |                       ^~~~~~~~~
In function ‘memcpy’,

I have attached the patch which can be built on my local build. please
review it and let me know if any issues.

BR,
Bo
diff -Nru libmcrypt-2.5.8/debian/changelog libmcrypt-2.5.8/debian/changelog
--- libmcrypt-2.5.8/debian/changelog    2022-01-18 15:03:51.000000000 -0500
+++ libmcrypt-2.5.8/debian/changelog    2024-08-25 10:49:01.000000000 -0400
@@ -1,3 +1,10 @@
+libmcrypt (2.5.8-7.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix ftbfs on gcc-14.
+
+ -- Bo YU <tsu.y...@gmail.com>  Sun, 25 Aug 2024 10:49:01 -0400
+
 libmcrypt (2.5.8-7) unstable; urgency=medium
 
   * Ignore test failure like in the old days.
diff -Nru libmcrypt-2.5.8/debian/patches/fix-gcc-14-ftbfs.patch 
libmcrypt-2.5.8/debian/patches/fix-gcc-14-ftbfs.patch
--- libmcrypt-2.5.8/debian/patches/fix-gcc-14-ftbfs.patch       1969-12-31 
19:00:00.000000000 -0500
+++ libmcrypt-2.5.8/debian/patches/fix-gcc-14-ftbfs.patch       2024-08-25 
10:47:54.000000000 -0400
@@ -0,0 +1,20 @@
+Description: fix ftbfs on gcc-14 
+Author: Bo YU <tsu.y...@gmail.com>
+Bug: https://bugs.debian.org/1075183
+Forwarded: imi...@sourceforge.net
+Last-Update: 2024-08-25
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/modules/algorithms/tripledes.c
++++ b/modules/algorithms/tripledes.c
+@@ -201,8 +201,8 @@
+       spinit(key, 0);
+       spinit(key, 1);
+       spinit(key, 2);
+-      perminit(&key->iperm, ip);
+-      perminit(&key->fperm, fp);
++      perminit(&key->iperm[0], ip);
++      perminit(&key->fperm[0], fp);
+ 
+ 
+       return 0;
diff -Nru libmcrypt-2.5.8/debian/patches/series 
libmcrypt-2.5.8/debian/patches/series
--- libmcrypt-2.5.8/debian/patches/series       2022-01-18 15:03:51.000000000 
-0500
+++ libmcrypt-2.5.8/debian/patches/series       2024-08-21 11:20:32.000000000 
-0400
@@ -1 +1,2 @@
 debian-changes
+fix-gcc-14-ftbfs.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to