Thanks for the bug report & patch. Have merged it in git repo on salsa. But there are so many mods in-tree I will probably just move it to be a regular commit.
Anyway, planning to upload as soon as I create a pkgconfig .pc support file, since the /usr/bin/libmcrypt-config it comes with is pretty crufty. Cheers, --Barak. On Sun, 25 Aug 2024 at 16:09, Bo YU <tsu.y...@gmail.com> wrote: > > 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