Skip to content

Commit

Permalink
Check seed fread
Browse files Browse the repository at this point in the history
  • Loading branch information
sakridge committed Aug 12, 2020
1 parent 225b59c commit ccb3a0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sgx-ecc-ed25519/seed.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ int ed25519_create_seed(unsigned char *seed) {
return 1;
}

fread(seed, 1, 32, f);
size_t ret = fread(seed, 1, 32, f);
if (ret != 32) {
fprintf(stderr, "Seed read error");
return 1;
}
fclose(f);
#endif
#endif
Expand Down

0 comments on commit ccb3a0e

Please sign in to comment.