incubator-milagro-crypto-c
incubator-milagro-crypto-c copied to clipboard
Warnings in build
The default build for the project triggers a few warnings on compilation
Steps to reproduce
This was observed on Ubuntu 19.10 using cc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 running the default build is enough to highlight some of the warnings, but more are triggered if a full build is executed.
Files
As far as I can tell these are the affected files:
test/test_ecdsa_verify_WWWW.c.in test/test_mpin_vectors_dta_WWW.c.in test/test_rsa_sign_WWW.c.in test/test_x509_WWW_ZZZ.c.in
src/fp12.c.in src/fp24.c.in src/ecp.c.in src/ecp2.c.in src/ecp4.c.in
Steps
As far as I can tell the tests should be trivial to fix. The warning is about the strncpy being used for non null terminated strings when reading the octets from test vector. Swappping strncpy for memcpy should solve the warning. The warnings on the source might be slightly more involved. At a first glance they look like unused variables and possibly uninitialized variables.