Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Imma ragin.

Name: Ragin geek. 2012-04-02 12:28

Imma ragin. And here's why.

I stumbled upon this project called rarcrack.
http://rarcrack.sourceforge.net/

It is a rar-password cracker made to work on unix-based os's.
Anyway, I tried compiling it and executing it, it would cause a a segfault.

So out of curiosity, I opened up gdb, ran it, and it segfaulted. I than ran a backtrace, and this is what I got.
http://paste.pocoo.org/show/574631/

Ok. So the problem is at line 348 at rarcrack.c. Which is:
printf("INFO: the specified archive type: %s\n", TYPE[archive_type]);

Ok. So printf is being passed something that is making it segfault. I found that it is negative one. So I managed to fix that, and here is what the patch looks like.

That's right. I simply put an if statement. I can't believe the developer has not done this.

I'm not even that efficient at C! This isn't that hard!!!
</rant>

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-01-25 2:48

Bette fix:
#define TYPE_UNK (sizeof(TYPE)/sizeof(TYPE[0]) - 1)
...
TYPE[] = { ... ... ... , "unknown" };
...

printf("INFO: the specified archive type: %s\n", TYPE[archive_type < 0 ? TYPE_UNK : archive_type]);

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List