sphincs / sphincsplus

The SPHINCS+ reference code, accompanying the submission to NIST's Post-Quantum Cryptography project
https://sphincs.org
Other
131 stars 44 forks source link

missing fclose #61

Open maddin200 opened 2 months ago

maddin200 commented 2 months ago

File: sphincsplus-master\ref\PQCgenKAT_sign.c line 51

Code: // Create the REQUEST file sprintf(fnreq, "PQCsignKAT%d.req", CRYPTO_SECRETKEYBYTES); if ( (fp_req = fopen(fn_req, "w")) == NULL ) { printf("Couldn't open <%s> for write\n", fn_req); return KAT_FILE_OPEN_ERROR; } sprintf(fnrsp, "PQCsignKAT%d.rsp", CRYPTO_SECRETKEYBYTES); if ( (fp_rsp = fopen(fn_rsp, "w")) == NULL ) { printf("Couldn't open <%s> for write\n", fn_rsp); // <-- missing fclose(fp_req) return KAT_FILE_OPEN_ERROR; }