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: Anonymous 2012-11-10 4:51

>>13
It can be -1 you piece of shit. There is no array bound checking in c. That said, the behaviour is not defined as the previous memory location(s) can belong to something else, which caused this segfault.

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