smuellerDD / acvpproxy

ACVP Proxy for accessing the NIST ACVP server for testing cryptographic implementations
https://www.chronox.de/acvpproxy
Other
16 stars 10 forks source link

Compilation Error Fedora #14

Closed acronymhaterheidi closed 5 years ago

acronymhaterheidi commented 5 years ago

I have encountered a compilation error that I have not seen before on a new Fedora installation. Here are my system details: Fedora 30 gcc 9.1.1 openssl 1.1.1b FIPS curl 7.64.0

Here is the output of make: cc -Werror -Wextra -Wall -pedantic -fPIC -O2 -std=gnu99 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fwrapv --param ssp-buffer-size=4 -fvisibility=hidden -fPIE -Wno-missing-field-initializers -Wno-gnu-zero-variadic-macro-arguments -Ilib -Iapps -c -o lib/acvp_paging.o lib/acvp_paging.c In file included from /usr/include/string.h:494, from lib/acvp_paging.c:21: In function ‘strncpy’, inlined from ‘acvp_paging_get’ at lib/acvp_paging.c:73:2: /usr/include/bits/string_fortified.h:106:10: error: ‘builtin_strncpy’ specified bound 4096 equals destination size [-Werror=stringop-truncation] 106 | return _builtinstrncpy_chk (dest, src, len, bos (__dest)); | ^~~~~~~~~~~~~~ lib/acvp_paging.c: At top level: cc1: error: unrecognized command line option ‘-Wno-gnu-zero-variadic-macro-arguments’ [-Werror] cc1: all warnings being treated as errors make: *** [: lib/acvp_paging.o] Error 1

I googled around a little but I didn't find anything useful. If you have any idea what might be causing this that would be wonderful.

Thanks, Heidi

smuellerDD commented 5 years ago

Am Mittwoch, 5. Juni 2019, 22:41:35 CEST schrieb Heidi Hart:

Hi Heidi,

I have encountered a compilation error that I have not seen before on a new Fedora installation. Here are my system details: Fedora 30 gcc 9.1.1 openssl 1.1.1b FIPS curl 7.64.0

Here is the output of make: cc -Werror -Wextra -Wall -pedantic -fPIC -O2 -std=gnu99 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fwrapv --param ssp-buffer-size=4 -fvisibility=hidden -fPIE -Wno-missing-field-initializers -Wno-gnu-zero-variadic-macro-arguments -Ilib -Iapps -c -o lib/acvp_paging.o lib/acvp_paging.c In file included from /usr/include/string.h:494, from lib/acvp_paging.c:21: In function ‘strncpy’, inlined from ‘acvp_paging_get’ at lib/acvp_paging.c:73:2: /usr/include/bits/string_fortified.h:106:10: error: ‘builtin_strncpy’ specified bound 4096 equals destination size [-Werror=stringop-truncation] 106 | return _builtinstrncpy_chk (dest, src, len, bos (__dest)); | ^~~~~~~~~~~~~~~ | ~~~

This is a common error when you have a static buffer and the strncpy has the potential to exeed the buffer without a terminating \0.

Thus, the solution is simple:

strncpy(parametrized_url, url, sizeof(parametrized_url) - 1); / Safety measure / parametrized_url[FILENAME_MAX - 1] = '\0';

lib/acvp_paging.c: At top level: cc1: error: unrecognized command line option ‘-Wno-gnu-zero-variadic-macro-arguments’ [-Werror] cc1: all warnings being treated as errors make: *** [: lib/acvp_paging.o] Error 1

I googled around a little but I didn't find anything useful. If you have any idea what might be causing this that would be wonderful.

Thanks, Heidi

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/smuellerDD/acvpproxy/issues/14

Ciao Stephan

acronymhaterheidi commented 5 years ago

That worked, thank you.