Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I compiled rarcrack on my ArchLinux 64 bits.
Warning while compiling : "Comparison between an integer and a pointer"
Error while executing : "Segmentation fault"
Same issue in UBUNTU:
Solution: delete/comment line 326 in rarcrack.c:
326: printf("INFO: detected file type: %s\n", TYPE[archive_type]);
It is not necessary. It happens because archive_type after not founding archive type equals -1, so it is bad index for table. If you make conditional f.e (if archive_type == -1) archive_type = 3 it works fully.
You seem to have CSS turned off.
Please don't fill out this field.
Yeah. The developer really messed up here. As said before, the problem is line 326. I'm no expert in C, but I'm guessing that printf was not used correctly. Wrong type of argument maybe?
Here is the backtrace in case it helps the developer or any possible contributors.
#0 0x00007ffff708d5bf in vfprintf () from /lib64/libc.so.6
#1 0x00007ffff7133c39 in __printf_chk () from /lib64/libc.so.6
#2 0x0000000000402347 in printf (__fmt=0x4027e8 "INFO: detected file type: %s\n") at /usr/include/bits/stdio2.h:105
#3 init (argc=2, argv=0x7fffffffdec8) at rarcrack.c:326
#4 0x000000000040261f in main (argc=2, argv=0x7fffffffdec8) at rarcrack.c:348
Alright. I know the mistake the developer made. If it can't tell the file type (which seems like always), printf get's passed an invalid variable type, thus causing the error. I'm not an expert, but it seems to me this can be fixed by a simple if test.
In other words, the dev needs to lrn2flowcontrol.
I fixed this once and for all.
Pay attention software author!
This is how you fix it.
Download my patch.
wget http://pastebin.com/raw.php?i=dqtxd1Pu rarcrack.c.fix
Rename the original source code.
mv rarcrack.c rarcrack.c.old
Apply the patch.
patch rarcrack.c.old -i rarcrack.c.fix.diff -o rarcrack.c
Now make and make install. It should work just fine now. :)
Hopefully, the developer will have this remedied by the next release. [/hint]
I wanted to assess rarcrack on an RAR I made with a known password. I got by the segmentation fault by using the "--type rar" switch. Of course, the password returned as good wasn't correct, but that got me by the segmentation fault.
What a joke.