hercules-390 / hyperion

Hercules 390
Other
246 stars 69 forks source link

Unpredictable results from herctest on Windows when a -f operand glob returns a single file. #271

Open srorso opened 5 years ago

srorso commented 5 years ago

Issue not apparent in non-Windows versions of herctest. I suspect a memory corruption issue within the routine win_glob. Issue is most apparent on 32-bit builds, but I suspect it exists, albeit asymptomatically, on 64-bit builds as well.

Symptoms include abnormal termination of herctest with running tests or analyzing test results, and without an error message indicating abnormal termination. When herctest is run by using CTest, CTest reports "Exception Other" on the test line and considers the test to have failed.

srorso commented 5 years ago

Issue caused by function win_glob() in herctest.c writing NULL to a location past the end of the glob results array, resulting in heap corruption.