incubator-milagro-crypto-c icon indicating copy to clipboard operation
incubator-milagro-crypto-c copied to clipboard

Warnings in build

Open samuele-andreoli opened this issue 5 years ago • 0 comments

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.

samuele-andreoli avatar Nov 12 '19 13:11 samuele-andreoli