This commit is contained in:
암냥 2026-06-23 10:19:44 +09:00
commit 000359f26c
3 changed files with 3 additions and 6 deletions

4
.gitignore vendored
View file

@ -1,5 +1,5 @@
tests/*.png tests/*
tests/*.gerbera !test/test.sh
build/ build/
.vscode .vscode
.DS_Store .DS_Store

View file

@ -107,6 +107,5 @@ int decrypt_file(const char *input_path, const char *output_path,
cleanup: cleanup:
if (input != NULL) fclose(input); if (input != NULL) fclose(input);
if (output != NULL && fclose(output) != 0) result = 1; if (output != NULL && fclose(output) != 0) result = 1;
if (result != 0) remove(output_path);
return result; return result;
} }

View file

@ -1,8 +1,6 @@
#include "gerbera.h" #include "gerbera.h"
#include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
@ -22,7 +20,7 @@ static int random_nonce(uint8_t nonce[GERBERA_NONCE_SIZE])
static int initialized = 0; static int initialized = 0;
if (!initialized) { if (!initialized) {
srand((unsigned)time(NULL)); srand((unsigned)time(NULL) ^ (unsigned)clock());
initialized = 1; initialized = 1;
} }