summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia <nonso@insicuri.net>2016-06-11 17:38:19 +0200
committerSeppia <nonso@insicuri.net>2016-06-11 17:38:19 +0200
commit56c7cadb8e8587b5ea382af1463f4aa0978891a2 (patch)
treeaa0fdf1298625dfebaab1f493b27eb7309aebc96
parentd16925e3b7910735586a36d6f197f624783dbfd3 (diff)
downloadonetimebluh-56c7cadb8e8587b5ea382af1463f4aa0978891a2.tar.gz
onetimebluh-56c7cadb8e8587b5ea382af1463f4aa0978891a2.tar.bz2
onetimebluh-56c7cadb8e8587b5ea382af1463f4aa0978891a2.zip
fixed pointer in keygen.c and onetimebluh.c
-rw-r--r--keygen.c3
-rw-r--r--onetimebluh.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/keygen.c b/keygen.c
index f3793ea..b03b89c 100644
--- a/keygen.c
+++ b/keygen.c
@@ -6,6 +6,7 @@ int main(int argc, char* argv[]) {
int opt;
int nbytes = 256;
+ char* defname = "default.key";
char* output;
int defout = 0;
int defbyte = 0;
@@ -43,7 +44,7 @@ int main(int argc, char* argv[]) {
unsigned char key[nbytes];
RAND_bytes(key, nbytes);
if (defout == 0) {
- output = "default.key";
+ output = defname;
printf("No output name specified... using default value: default.key \n");
}
FILE* file = fopen(output, "w");
diff --git a/onetimebluh.c b/onetimebluh.c
index b8f3f8c..83cf93a 100644
--- a/onetimebluh.c
+++ b/onetimebluh.c
@@ -24,6 +24,7 @@ int main(int argc, char* argv[]) {
void xor(int ac, char* av[]) {
int opt;
+ char* defname = "critt";
int defout = 0;
char* output;
while ((opt = getopt(ac, av, "o:")) != -1) {
@@ -40,7 +41,7 @@ void xor(int ac, char* av[]) {
if (defout == 0) {
printf("WARNING no command specified using default value critt \n");
- output = "critt";
+ output = defname;
}
FILE* mess_uno = fopen(av[2], "r");
FILE* mess_due = fopen(av[3], "r");