Originally Posted by
Salem
> (gdb) run naveenraj
One presumes that one is smart enough to pass TWO arguments to a program when TWO arguments are expected.
Or at least change the number of expected arguments check at the beginning of the program to defend against user error.
> Blowfish_Init (&ctx, (unsigned char*)"Kn0wed&e1s^0wER", 7);
What do you think the 7 actually represented in the first example?
- The number of days in a week.
- The number of faces on a cube, +1
- The length of the edge of a chess board, -1
- The length of the key string.
Actually i forgot to change the key length
Code:
Blowfish_Init (&ctx, (unsigned char*)"Kn0wed&e1s^0wER", 15);
Code:
Reading symbols from ./a.out...done.
(gdb) run technology
Starting program: /home/niche-0043/Downloads/bfsh-sch/a.out technology
Encrypting string(10): (null)
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400d00 in main (argc=2, argv=0x7fffffffdeb8) at blow.c:528
528 enc[i] = str[i];
(gdb)