blackducksw/ohcount — pull request #8 by ehsan (2011-10-09 22:09:16+00:00)
Title: Fix a crash when encountering an empty .r file

When ohcount encounters an .r file, it tries to see if it's a rebol file. There's a crash bug however since the disambiguate_r function doesn't correctly handle the case of empty .r files, which causes a null pointer to be dereferenced (because eof - len would be an extremely large number, and contents is always going to be smaller than that, so the body of the for loop is entered.

I found this bug when I tried running ohcount on the current WebKit repository.