feat: md2_2 nullcheck updated
This commit is contained in:
parent
558f509281
commit
c28c2d16d0
1 changed files with 2 additions and 4 deletions
|
@ -58,14 +58,12 @@ void md2_hash_2(size_t len, const uint8_t buf[len], uint8_t out[16]) {
|
|||
uint8_t l = 0;
|
||||
uint8_t* checksum = calloc(16, sizeof(uint8_t));
|
||||
if (checksum == NULL) {
|
||||
printf("Failure: calloc returns NULL");
|
||||
return EXIT_FAILURE;
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t* data = malloc(16);
|
||||
if (data == NULL) {
|
||||
printf("Failure: malloc returns NULL");
|
||||
return EXIT_FAILURE;
|
||||
return;
|
||||
}
|
||||
size_t bytes_left_to_read = file_stat.st_size;
|
||||
size_t bytes_left_to_process = 0;
|
||||
|
|
Loading…
Reference in a new issue