namazso / OpenHashTab

📝 File hashing and checking shell extension
GNU General Public License v3.0
3.24k stars 124 forks source link

8bit Hex value 01 repeated x 11468800 bytes file crashes Explorer when hashing it #174

Closed ThePicMan closed 1 year ago

ThePicMan commented 1 year ago

Hello, windows Explorer crashes if I try to Hash a 11468800 bytes file where each, all and every byte is hex "01".

ThePicMan commented 1 year ago

This happens with OpenHashTab v3.0.2

I compressed (that was easy) and updated the file here: !!!!!This crashes Explorer when Hashing it.ZIP

namazso commented 1 year ago

Stack overflow in sumfile matching regex, probably too many captures. Not exploitable, will try to replace it with a regex that doesn't do that.

ThePicMan commented 1 year ago

Thank you, keep the great work, I appreciate it, it's a very handy tool.

namazso commented 1 year ago

So the problem here is the SFV file matcher: SFV files are pretty bad because the file name (which may contain spaces) comes first, followed by whitespace, then the hash. this means that it can only be matched with greedy matchers, since we never know which space is the one we're looking for. I don't think I can solve this in regex, so it seems like I'll have to process these in code instead.

namazso commented 1 year ago

I decided to just not support spaces in SFV files. They're used primarily in scene releases, and those don't have spaces. The format just sucks, really.