Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2018-11-30 20:53:47

Gtpy
Contributor
From: GER
Registered: 2017-10-24
Posts: 32

[RDV4] Newbie question about compiling warnings

Hi,

really new to proxmark3.
Can be flashed without hesitation in case of warnings?

RDV4

Try to compile the actual master from https://github.com/RfidResearchGroup/proxmark3

load.c:118:29: warning: ‘ near '’ directive output may be truncated writing 7 bytes into a region of size between 1 and 160 [-Wformat-truncation=]
                          "%s near '%s'", msg_text, saved_text);
                             ^~~~~~~
In file included from /usr/include/stdio.h:873,
                 from jansson.h:11,
                 from jansson_private.h:16,
                 from load.c:12:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 9 or more bytes (assuming 168) into a destination of size 160
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
load.c:135:29: warning: ‘ near end of file’ directive output may be truncated writing 17 bytes into a region of size between 1 and 160 [-Wformat-truncation=]
                          "%s near end of file", msg_text);
                             ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:873,
                 from jansson.h:11,
                 from jansson_private.h:16,
                 from load.c:12:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 18 and 177 bytes into a destination of size 160
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -DHAVE_STDINT_H -I. -O2 -Wall -Wno-unused-variable -Wno-unused-function -c -o memory.o memory.c  

ui.c: In function ‘PrintAndLogEx’:
ui.c:112:41: warning: ‘%s’ directive output may be truncated writing up to 2047 bytes into a region of size between 2029 and 2048 [-Wformat-truncation=]
   snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
                                         ^~           ~~~~~~
In file included from /usr/include/stdio.h:873,
                 from ui.h:17,
                 from ui.c:12:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 1 and 2067 bytes into a destination of size 2048
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f obj/ui.Td obj/ui.d
gcc -MT obj/util.o -MMD -MP -MF obj/util.Td  -std=c99 -D_ISOC99_SOURCE -DPRESETS -I. -I../include -I../common -I/opt/local/include -I../zlib -I../uart -I../liblua -I../common/mbedtls -I./jansson -I./tinycbor -Wall -g -O3 -DHAVE_GUI -DWITH_FLASH -DWITH_SMARTCARD  -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED -c -o obj/util.o util.c
util.c: In function ‘sprint_hex_ascii’:
util.c:316:18: warning: ‘| ’ directive writing 2 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  sprintf(tmp, "%s| ", sprint_hex(data, max_len) );
                  ^~
In file included from /usr/include/stdio.h:873,
                 from util.h:19,
                 from util.c:10:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 4099 bytes into a destination of size 4097
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f obj/util.Td obj/util.d

cmdhf15.c: In function ‘CmdHF15Restore’:
cmdhf15.c:861:39: warning: ‘ u ’ directive output may be truncated writing 3 bytes into a region of size between 1 and 255 [-Wformat-truncation=]
   snprintf(tmpCmd, sizeof(tmpCmd), "%s u %d %s", newCmdPrefix, i, hex);
                                       ^~~
cmdhf15.c:861:36: note: directive argument in the range [0, 255]
   snprintf(tmpCmd, sizeof(tmpCmd), "%s u %d %s", newCmdPrefix, i, hex);
                                    ^~~~~~~~~~~~
In file included from /usr/include/stdio.h:873,
                 from cmdhf15.h:14,
                 from cmdhf15.c:25:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 6 and 516 bytes into a destination of size 255
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f obj/cmdhf15.Td obj/cmdhf15.d
gcc -MT obj/cmdhfepa.o -MMD -MP -MF obj/cmdhfepa.Td  -std=c99 -D_ISOC99_SOURCE -DPRESETS -I. -I../include -I../common -I/opt/local/include -I../zlib -I../uart -I../liblua -I../common/mbedtls -I./jansson -I./tinycbor -Wall -g -O3 -DHAVE_GUI -DWITH_FLASH -DWITH_SMARTCARD  -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED -c -o obj/cmdhfepa.o cmdhfepa.c
mv -f obj/cmdhfepa.Td obj/cmdhfepa.d
gcc -MT obj/cmdhflegic.o -MMD -MP -MF obj/cmdhflegic.Td  -std=c99 -D_ISOC99_SOURCE -DPRESETS -I. -I../include -I../common -I/opt/local/include -I../zlib -I../uart -I../liblua -I../common/mbedtls -I./jansson -I./tinycbor -Wall -g -O3 -DHAVE_GUI -DWITH_FLASH -DWITH_SMARTCARD  -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED -c -o obj/cmdhflegic.o cmdhflegic.c
mv -f obj/cmdhflegic.Td obj/cmdhflegic.d
gcc -MT obj/cmdhficlass.o -MMD -MP -MF obj/cmdhficlass.Td  -std=c99 -D_ISOC99_SOURCE -DPRESETS -I. -I../include -I../common -I/opt/local/include -I../zlib -I../uart -I../liblua -I../common/mbedtls -I./jansson -I./tinycbor -Wall -g -O3 -DHAVE_GUI -DWITH_FLASH -DWITH_SMARTCARD  -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED -c -o obj/cmdhficlass.o cmdhficlass.c
mv -f obj/cmdhficlass.Td obj/cmdhficlass.d
gcc -MT obj/cmdhfmf.o -MMD -MP -MF obj/cmdhfmf.Td  -std=c99 -D_ISOC99_SOURCE -DPRESETS -I. -I../include -I../common -I/opt/local/include -I../zlib -I../uart -I../liblua -I../common/mbedtls -I./jansson -I./tinycbor -Wall -g -O3 -DHAVE_GUI -DWITH_FLASH -DWITH_SMARTCARD  -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED -c -o obj/cmdhfmf.o cmdhfmf.c
cmdhfmf.c: In function ‘CmdHF14AMfNestedHard’:
cmdhfmf.c:1361:46: warning: ‘%s’ directive output may be truncated writing up to 999 bytes into a region of size 994 [-Wformat-truncation=]
    snprintf(filename, FILE_PATH_SIZE, "hf-mf-%s-nonces.bin", szTemp);
                                              ^~              ~~~~~~
In file included from /usr/include/stdio.h:873,
                 from cmdhfmf.h:14,
                 from cmdhfmf.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 18 and 1017 bytes into a destination of size 1000
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cmdhfmf.c: In function ‘CmdHF14AMfRestore’:
cmdhfmf.c:897:50: warning: ‘%s’ directive output may be truncated writing up to 999 bytes into a region of size 994 [-Wformat-truncation=]
     snprintf(keyFilename, FILE_PATH_SIZE, "hf-mf-%s-key.bin", szTemp);
                                                  ^~           ~~~~~~
In file included from /usr/include/stdio.h:873,
                 from cmdhfmf.h:14,
                 from cmdhfmf.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 15 and 1014 bytes into a destination of size 1000
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cmdhfmf.c:899:51: warning: ‘%s’ directive output may be truncated writing up to 999 bytes into a region of size 994 [-Wformat-truncation=]
     snprintf(dataFilename, FILE_PATH_SIZE, "hf-mf-%s-data.bin", szTemp);
                                                   ^~            ~~~~~~
In file included from /usr/include/stdio.h:873,
                 from cmdhfmf.h:14,
                 from cmdhfmf.c:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 16 and 1015 bytes into a destination of size 1000
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mv -f obj/cmdhfmf.Td obj/cmdhfmf.d

Thanks a lot.

Last edited by Gtpy (2018-11-30 21:09:06)

Offline

#2 2018-11-30 21:30:49

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: [RDV4] Newbie question about compiling warnings

...Kali?   There is a bunch warnings on gcc v8.x.x   

On proxspace3.1 (mingw), ubuntu 16.04, 18.04  gcc v7.3.0 , v4.9.0  all compiles just fine. Even on OS X  (clang) compiles...
I feel its too many compilers to keep up with.

Offline

#3 2018-11-30 21:32:56

Gtpy
Contributor
From: GER
Registered: 2017-10-24
Posts: 32

Re: [RDV4] Newbie question about compiling warnings

It's on ubuntu 18.10 gcc v8.x.x

Offline

#4 2018-11-30 21:43:50

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: [RDV4] Newbie question about compiling warnings

Feel free to sort it out and make a PR  smile

Offline

#5 2018-11-30 21:55:56

Gtpy
Contributor
From: GER
Registered: 2017-10-24
Posts: 32

Re: [RDV4] Newbie question about compiling warnings

First I’ll go on and take a closer look to my brand new RDV4
As soon as I have tried a few things, I familiarize myself with the coding.
Strangely enough, the days are always too short.
(Just a hobby and besides family and work feasible)
smile

Offline

#6 2018-11-30 21:57:31

iceman
Administrator
Registered: 2013-04-25
Posts: 9,497
Website

Re: [RDV4] Newbie question about compiling warnings

I know the feeling

Offline

Board footer

Powered by FluxBB