bipinu / truecrack

Automatically exported from code.google.com/p/truecrack
GNU General Public License v3.0
1 stars 0 forks source link

Segmentation fault #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure to use CPU mode
2. Create a wordlist to crack a truecrypt container, containing >32 char 
passwords
3. Run truecrack with said wordlist

What is the expected output? What do you see instead?
Expect truecrack to run smoothly.
Instead, segmentation fault occurs.

What version of the product are you using? On what operating system?
Version 3, released februari 23rd, 2013.

Please provide any additional information below.

Using debugger, it seems the problem is in Main/Utils.c, in function 
file_readWordsBlock, where instead of "PASSWORD_MAXSIZE" (32 chars), 
"MAXWORDSIZE" (64 chars) is used. When this is changed, and CpuCore.h is 
included, everything seems to work a-ok again.

Debug info:
(gdb) run -t ../container.tc -w ../memory.strings
Starting program: /usr/local/bin/truecrack -t ../container.tc -w 
../memory.strings
TrueCrack v3.0
Website: http://code.google.com/p/truecrack
Contact us: infotruecrack@gmail.com

Program received signal SIGSEGV, Segmentation fault.
0x000000000040531f in file_readWordsBlock (fp=0x623080, block_size=1, 
words=0x623010 '=' <repeats 58 times>, "\n", words_init=0x623040, 
words_length=0x623060)
    at Main/Utils.c:112
112             words[words_init[i]+strlen(buffer)-1]='\0'; //remmember the \0
(gdb) bt
#0  0x000000000040531f in file_readWordsBlock (fp=0x623080, block_size=1, 
words=0x623010 '=' <repeats 58 times>, "\n", words_init=0x623040, 
words_length=0x623060)
    at Main/Utils.c:112
#1  0x00000000004044c0 in core_dictionary () at Main/Core.c:246
#2  0x000000000040438a in core () at Main/Core.c:134
#3  0x0000000000405861 in main (argc=5, argv=0x7fffffffe648) at Main/Main.c:230

and:
(gdb) p words
$5 = 0x623010 '=' <repeats 58 times>, "\n"
(gdb) p words_length[i]
$6 = 59

Original issue reported on code.google.com by Sander.D...@gmail.com on 12 Mar 2013 at 2:30

GoogleCodeExporter commented 9 years ago
Thank you very much. I fix the problem! :-)

Original comment by luck87 on 12 Jun 2013 at 12:16