From c28c2d16d00488afb434d31e77debb2698292e46 Mon Sep 17 00:00:00 2001 From: finn Date: Wed, 20 Jul 2022 12:16:01 +0200 Subject: [PATCH] feat: md2_2 nullcheck updated --- Implementierung/src/md2_impls/md2_2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Implementierung/src/md2_impls/md2_2.c b/Implementierung/src/md2_impls/md2_2.c index 279af73..90fd232 100644 --- a/Implementierung/src/md2_impls/md2_2.c +++ b/Implementierung/src/md2_impls/md2_2.c @@ -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;