mirror of https://github.com/BOINC/boinc.git
Lib: check return value of scan_key_hex() in crypt_prog
fixes CID 27714 found by Coverity
This commit is contained in:
parent
a8fea2c56a
commit
92a4ffb5e6
|
@ -325,8 +325,9 @@ int main(int argc, char** argv) {
|
|||
if (!fpriv) {
|
||||
die("fopen");
|
||||
}
|
||||
scan_key_hex(fpriv, (KEY*)&private_key, sizeof(private_key));
|
||||
retval = scan_key_hex(fpriv, (KEY*)&private_key, sizeof(private_key));
|
||||
fclose(fpriv);
|
||||
if (retval) die("scan_key_hex\n");
|
||||
private_to_openssl(private_key, &rsa_key);
|
||||
|
||||
//i = PEM_write_bio_RSAPrivateKey(bio_out, &rsa_key,
|
||||
|
@ -348,8 +349,9 @@ int main(int argc, char** argv) {
|
|||
if (!fpub) {
|
||||
die("fopen");
|
||||
}
|
||||
scan_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
|
||||
retval = scan_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
|
||||
fclose(fpub);
|
||||
if (retval) die("scan_key_hex\n");
|
||||
fpub = fopen(argv[5], "w+");
|
||||
if (!fpub) {
|
||||
die("fopen");
|
||||
|
|
Loading…
Reference in New Issue