From f87b2dbd8f0728e2256fa0f578ee0bc86ffb195d Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Sat, 27 Sep 2025 10:03:20 -0400 Subject: [PATCH] Version v0.3.15 - Change temp pad location to final destination for the pad --- otp-arm64 | Bin 107048 -> 107048 bytes otp-x86_64 | Bin 122128 -> 122128 bytes otp.c | 46 +++++++++------------------------------------- 3 files changed, 9 insertions(+), 37 deletions(-) diff --git a/otp-arm64 b/otp-arm64 index d962bd7722ad38f34c4f1b71adede7f0608237cc..4bc2ec2da502c17ae5ef76e10d4d86728685c127 100755 GIT binary patch delta 63 zcmZ2+gl)wUwhbvvB0*iEQ_F;HJ}C<9GxR77tU7f-qP4k#X?q0|<24aRlkNWEj1DS5 RdV)10yA+U~5z08h2LSCt6?Oms delta 63 zcmZ2+gl)wUwhbvvB3~Wl*K>SyD?Gxkr7 0) { - if (fwrite(copy_buffer, 1, bytes_read, dest_file) != bytes_read) { - printf("Error: Failed to copy pad file to pads directory\n"); - fclose(temp_file); - fclose(dest_file); - unlink(temp_filename); - unlink(pad_path); - return 1; - } - } - - fclose(temp_file); - fclose(dest_file); - - // Remove temporary file after successful copy + printf("Error: Cannot rename temporary pad file to final name\n"); unlink(temp_filename); + return 1; } // Set pad file to read-only @@ -3825,7 +3797,7 @@ int generate_ascii_armor(const char* chksum, uint64_t offset, const unsigned cha strcpy(*ascii_output, "-----BEGIN OTP MESSAGE-----\n"); char temp_line[256]; - snprintf(temp_line, sizeof(temp_line), "Version: v0.3.13\n"); + snprintf(temp_line, sizeof(temp_line), "Version: v0.3.14\n"); strcat(*ascii_output, temp_line); snprintf(temp_line, sizeof(temp_line), "Pad-ChkSum: %s\n", chksum); @@ -5567,7 +5539,7 @@ int handle_delete_pad(const char* pad_chksum) { void print_usage(const char* program_name) { - printf("OTP Cipher - One Time Pad Implementation v0.3.13\n"); + printf("OTP Cipher - One Time Pad Implementation v0.3.14\n"); printf("Built for testing entropy system\n"); printf("Usage:\n"); printf(" %s - Interactive mode\n", program_name);