diff --git a/Implementierung/src/md2_impls/md2_2.c b/Implementierung/src/md2_impls/md2_2.c index f1ab4b6..e250f05 100644 --- a/Implementierung/src/md2_impls/md2_2.c +++ b/Implementierung/src/md2_impls/md2_2.c @@ -46,7 +46,10 @@ void md2_checksum_2(size_t, uint8_t*) {} void md2_hash_2(size_t len, const uint8_t buf[len], uint8_t out[16]) { FILE* file; struct stat file_stat; - open_file((char*)buf, &file, &file_stat); + if (!open_file((char*)buf, &file, &file_stat)) { + fprintf(stderr, "Error opening the file!"); + return; + } // === step 3 === uint8_t* messageDigestBuf = calloc(48, sizeof(uint8_t));