• Bug#1066521: weplab: FTBFS: analpfile.c:105:21: error: implicit declara

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:30:02 2024
    Source: weplab
    Version: 0.1.5-6
    Severity: serious
    Justification: FTBFS
    Tags: trixie sid ftbfs
    User: lucas@debian.org
    Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

    Hi,

    During a rebuild of all packages in sid, your package failed to build
    on amd64.

    This is most likely caused by a change in dpkg 1.22.6, that enabled -Werror=implicit-function-declaration. For more information, see https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

    Relevant part (hopefully):
    gcc -DPACKAGE_NAME=\"weplab\" -DPACKAGE_TARNAME=\"weplab\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"weplab\ 0.1.5\" -DPACKAGE_BUGREPORT=\"TopoLB\ -\ Jose\ Ignacio\ Sanchez\ \<topolb@users.sourceforge.net\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"weplab\"
    -DVERSION=\"0.1.5\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_PCAP_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_
    H=1 -DHAVE_UNISTD_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_TIME_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_LIBPCAP=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=
    . -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -std=gnu89 -Wall -pipe -c -o md5.o md5.c
    md5.c: In function ‘MD5Final’:
    md5.c:132:26: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
    132 | memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
    | ^
    main.c: In function ‘ReadHexByteArray’:
    main.c:138:15: warning: unused variable ‘j’ [-Wunused-variable]
    138 | int i,j;
    | ^
    dictionary.c: In function ‘GetNextWord’:
    dictionary.c:143:27: warning: pointer targets in passing argument 1 of ‘fgets’ differ in signedness [-Wpointer-sign]
    143 | while (((rv=fgets(word, sz-1, wordfile))!=NULL)&&((word[0]=='\r')||(word[0]=='\n'))) {
    | ^~~~
    | |
    | unsigned char *
    In file included from /usr/include/stdio.h:906,
    from /usr/include/pcap/pcap.h:136,
    from /usr/include/pcap.h:43,
    from dictionary.c:26: /usr/include/x86_64-linux-gnu/bits/stdio2.h:209:25: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’
    209 | fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
    | ~~~~~~~~~~~~~~~~~^~~
    dictionary.c: In function ‘dictionary’:
    dictionary.c:284:41: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
    284 | strncpy(keys, word, global_v.key_len);
    | ^~~~
    | |
    | unsigned char *
    In file included from /usr/include/features.h:490,
    from /usr/include/inttypes.h:25,
    from /usr/include/pcap/pcap-inttypes.h:98,
    from /usr/include/pcap/pcap.h:117: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:92:1: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’
    92 | __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
    | ^~~~~
    dictionary.c:284:47: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness [-Wpointer-sign]
    284 | strncpy(keys, word, global_v.key_len);
    | ^~~~
    | |
    | unsigned char * /usr/include/x86_64-linux-gnu/bits/string_fortified.h:92:1: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’
    92 | __NTH (strncpy (char *__restrict __dest, const char *__restrict __src,
    | ^~~~~
    main.c: In function ‘main’:
    main.c:303:45: warning: pointer targets in assignment from ‘char *’ to ‘unsigned char *’ differ in signedness [-Wpointer-sign]
    303 | saux=optarg;
    | ^
    main.c:307:58: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness [-Wpointer-sign]
    307 | if (atoi(saux)>NUMBER_ATTACKS || !atoi(saux)) QuitParameterError("attacks to be launched must be defined as positive numbers from 1 to 5 splitted by commas and no spaces");
    | ^~~~
    | |
    | unsigned char *
    dictionary.c:286:40: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
    286 | strcpy(last_keys, keys);
    | ^~~~~~~~~
    | |
    | unsigned char * /usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’
    77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
    | ^~~~~
    In file included from /usr/include/features.h:490,
    from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
    from /usr/include/stdio.h:27,
    from main.c:28:
    /usr/include/stdlib.h:362:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
    362 | __NTH (atoi (const char *__nptr))
    | ^~~~~
    dictionary.c:286:51: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness [-Wpointer-sign]
    286 | strcpy(last_keys, keys);
    | ^~~~
    | |
    | unsigned char * /usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: expected ‘const char * __restrict__’ but argument is of type ‘unsigned char *’
    77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
    | ^~~~~
    main.c:307:88: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness [-Wpointer-sign]
    307 | if (atoi(saux)>NUMBER_ATTACKS || !atoi(saux)) QuitParameterError("attacks to be launched must be defined as positive numbers from 1 to 5 splitted by commas and no spaces");
    | ^~~~
    | |
    | unsigned char *
    dictionary.c:294:55: warning: pointer targets in passing argument 1 of ‘wep_keygen128’ differ in signedness [-Wpointer-sign]
    294 | wep_keygen128(word, keys);
    | ^~~~
    | |
    | unsigned char * dictionary.c:71:26: note: expected ‘char *’ but argument is of type ‘unsigned char *’
    71 | void wep_keygen128(char *str, unsigned char *keys){
    | ~~~~~~^~~
    dictionary.c:300:54: warning: pointer targets in passing argument 1 of ‘wep_keygen40’ differ in signedness [-Wpointer-sign]
    300 | wep_keygen40(word, keys);
    | ^~~~
    | |
    | unsigned char * dictionary.c:104:25: note: expected ‘char *’ but argument is of type ‘unsigned char *’
    104 | void wep_keygen40(char *str, u_char *keys){
    | ~~~~~~^~~
    /usr/include/stdlib.h:362:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
    362 | __NTH (atoi (const char *__nptr))
    | ^~~~~
    main.c:308:87: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness [-Wpointer-sign]
    308 | defaultAttacks[STABILITY_LEVELS][atoi(saux)-1]=1;
    | ^~~~
    | |
    | unsigned char *
    /usr/include/stdlib.h:362:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
    362 | __NTH (atoi (const char *__nptr))
    | ^~~~~
    main.c:310:53: warning: pointer targets in assignment from ‘char *’ to ‘unsigned char *’ differ in signedness [-Wpointer-sign]
    310 | saux=(&optarg[i])+1;
    | ^
    analpfile.c: In function ‘AnalyzePcapFile’:
    analpfile.c:105:21: error: implicit declaration of function ‘GetPacketBssid’ [-Werror=implicit-function-declaration]
    105 | if (GetPacketBssid(pkt+144,bssid)){
    | ^~~~~~~~~~~~~~
    main.c:334:79: warning: pointer targets in passing argument 1 of ‘ReadHexByteArray’ differ in signedness [-Wpointer-sign]
    334 | global_v.useDebugKey=ReadHexByteArray(optarg,global_v.debugKey,strlen(optarg)+1);
    | ^~~~~~
    | |
    | char *
    main.c:137:37: note: expected ‘unsigned char *’ but argument is of type ‘char *’
    137 | int ReadHexByteArray(unsigned char *asciiByteArray, unsigned char *destination, int asciiByteArrayMaxSize){
    | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    main.c:196:17: warning: unused variable ‘h2’ [-Wunused-variable]
    196 | int h1, h2;
    | ^~
    main.c:196:13: warning: unused variable ‘h1’ [-Wunused-variable]
    196 | int h1, h2;
    | ^~
    gcc -DPACKAGE_NAME=\"weplab\" -DPACKAGE_TARNAME=\"weplab\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"weplab\ 0.1.5\" -DPACKAGE_BUGREPORT=\"TopoLB\ -\ Jose\ Ignacio\ Sanchez\ \<topolb@users.sourceforge.net\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"weplab\"
    -DVERSION=\"0.1.5\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_PCAP_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_
    H=1 -DHAVE_UNISTD_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_TIME_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_LIBPCAP=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=
    . -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -std=gnu89 -Wall -pipe -c -o wep.o wep.c
    analpfile.c:106:70: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
    106 | indexArray=(unsigned int) ((bssid[0]^bssid[1]+bssid[2]^bssid[3]+bssid[4]^bssid[5])&0x00000FFF);
    | ~~~~~~~~^~~~~~~~~
    analpfile.c:106:88: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
    106 | indexArray=(unsigned int) ((bssid[0]^bssid[1]+bssid[2]^bssid[3]+bssid[4]^bssid[5])&0x00000FFF);
    | ~~~~~~~~^~~~~~~~~
    analpfile.c:115:71: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
    115 | indexArray=(unsigned char) ((bssid[0]^bssid[1]+bssid[2]^bssid[3]+bssid[4]^bssid[5])&0x00000FFF);
    | ~~~~~~~~^~~~~~~~~
    analpfile.c:115:89: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
    115 | indexArray=(unsigned char) ((bssid[0]^bssid[1]+bssid[2]^bssid[3]+bssid[4]^bssid[5])&0x00000FFF);
    | ~~~~~~~~^~~~~~~~~
    analpfile.c:187:54: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
    187 | indexArray=(unsigned int) ((bssid[0]^bssid[1]+bssid[2]^bssid[3]+bssid[4]^bssid[5])&0x00000FFF);
    | ~~~~~~~~^~~~~~~~~ analpfile.c:187:72: warning: suggest parentheses around arithmetic in operand of ‘^’ [-Wparentheses]
    187 | indexArray=(unsigned int) ((bssid[0]^bssid[1]+bssid[2]^bssid[3]+bssid[4]^bssid[5])&0x00000FFF);
    | ~~~~~~~~^~~~~~~~~
    heuristics.c: In function ‘GuessOutputByte’:
    heuristics.c:61:10: warning: unused variable ‘E’ [-Wunused-variable]
    61 | u_char E, S[N];
    | ^
    heuristics.c: In function ‘GetWeakPackets’:
    heuristics.c:325:49: error: implicit declaration of function ‘target_bssid’ [-Werror=implicit-function-declaration]
    325 | if (global_v.target_bssid_selected) if (target_bssid(pkt)) {
    | ^~~~~~~~~~~~ heuristics.c: In function ‘CalculateSimpleHeuristics’: heuristics.c:397:108: warning: unknown conversion type character ‘)’ in format [-Wformat=]
    397 | printf("Perhaps you should increase the default probability (--perc) to a higher value (default 70%), or capture more packets.\n");
    | ^
    heuristics.c:394:17: warning: ‘GuessOutputByte’ accessing 17408 bytes in a region of size 13312 [-Wstringop-overflow=]
    394 | GuessOutputByte(i, global_v.debugKey, packets, controlPackets, votes);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    heuristics.c:394:17: note: referencing argument 5 of type ‘unsigned int[17][256]’
    heuristics.c:57:6: note: in a call to function ‘GuessOutputByte’
    57 | void GuessOutputByte(int keyByte, u_char *sKey, t_StoredPacketsIV *packets, t_storedPacket **controlPackets, unsigned int votes[17][256])
    | ^~~~~~~~~~~~~~~
    wep.c: In function ‘GetLessSizedPackets’:
    wep.c:289:29: error: implicit declaration of function ‘target_bssid’ [-Werror=implicit-function-declaration]
    289 | if (target_bssid(pkt)) {
    | ^~~~~~~~~~~~
    wep.c:294:29: error: implicit declaration of function ‘GetPacketBssid’ [-Werror=implicit-function-declaration]
    294 | if (GetPacketBssid(pkt,global_v.target_bssid)){
    | ^~~~~~~~~~~~~~
    wep.c:360:30: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
    360 | printf("Total packets read: %u\n",totalPackets);
    | ~^ ~~~~~~~~~~~~
    | | |
    | | long unsigned int
    | unsigned int
    | %lu
    bruteforce.c: In function ‘bruteforce’:
    bruteforce.c:170:42: warning: ‘mpid’ may be used uninitialized [-Wmaybe-uninitialized]
    170 | for (i=0; i<global_v.processes-1 && mpid; i++){
    | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    bruteforce.c:120:15: note: ‘mpid’ was declared here
    120 | pid_t mpid;
    | ^~~~
    gcc -DPACKAGE_NAME=\"weplab\" -DPACKAGE_TARNAME=\"weplab\" -DPACKAGE_VERSION=\"0.1.5\" -DPACKAGE_STRING=\"weplab\ 0.1.5\" -DPACKAGE_BUGREPORT=\"TopoLB\ -\ Jose\ Ignacio\ Sanchez\ \<topolb@users.sourceforge.net\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"weplab\"
    -DVERSION=\"0.1.5\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_PCAP_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_
    H=1 -DHAVE_UNISTD_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_TIME_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_LIBPCAP=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=
    . -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -std=gnu89 -Wall -pipe -c -o attack.o attack.c
    main.c:354:52: warning: ‘__builtin_strncpy’ output may be truncated copying 200 bytes from a string of length 255 [-Wstringop-truncation]
    354 | if (!strcmp(global_v.weakPcapFilename,"")) strncpy(global_v.weakPcapFilename, global_v.packetsFilename, 200);
    | ^
    cc1: some warnings being treated as errors
    make[1]: *** [Makefile:436: analpfile.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/weplab_0.1.5-6_unstable.log

    All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
    or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

    A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

    If you reassign this bug to another package, please mark it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects

    If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)