summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuke <luke@inventati.org>2016-11-12 19:31:20 +0100
committerLuke <luke@inventati.org>2016-11-12 19:31:20 +0100
commit9fb9660f11053ef275cebb23d1fbac2d830aded2 (patch)
tree353dc9e26a538cf79df3ebe42920073abf0d7d34 /src
parent925f568fbe54267352ee22b3563c0a338c7af80c (diff)
downloadonetimebluh-9fb9660f11053ef275cebb23d1fbac2d830aded2.tar.gz
onetimebluh-9fb9660f11053ef275cebb23d1fbac2d830aded2.tar.bz2
onetimebluh-9fb9660f11053ef275cebb23d1fbac2d830aded2.zip
Changes to be committed:
modified: src/onetimebluh.c Fixed error concerning the indicator position in the key stream file. The line fseek(keyx, (pad_size - mess_size), SEEK_SET); was executed only in presence of the -t option. No code was added to fix this.
Diffstat (limited to 'src')
-rw-r--r--src/onetimebluh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/onetimebluh.c b/src/onetimebluh.c
index 8c46524..9f356d5 100644
--- a/src/onetimebluh.c
+++ b/src/onetimebluh.c
@@ -143,14 +143,14 @@ void xor(int ed, char* mess, char* keyf, char* outp) {
long mess_size;
long pad_size;
- if (ed == 'f' || ed == 'v') {
+
fseek(mex, 0L, SEEK_END);
mess_size = ftell(mex);
rewind(mex);
fseek(keyx, 0L, SEEK_END);
pad_size = ftell(keyx);
fseek(keyx, (pad_size - mess_size), SEEK_SET);
- }
+
int i = 1;
char a, b;