From: Anonymous Date: 2008-08-01T11:55:40+09:00 Subject: [ruby-core:18041] [Ruby 1.8.7 - Bug #382] (Open) Dir#tell leads to segfaults in Dir#read on win32 Issue #382 has been reported by Anonymous. ---------------------------------------- Bug #382: Dir#tell leads to segfaults in Dir#read on win32 http://redmine.ruby-lang.org/issues/show/382 Author: Anonymous Status: Open Priority: Normal Assigned to: Category: Target version: rb_w32_telldir calculates the position on each call by repeatedly calling move_to_next_entry. This increases dirp->loc each time and leads to segfaults in rb_w32_readdir when reading dirp->bits because dirp->loc can be larger than allowed. Simply returning dirp->loc in rb_w32_telldir and zeroing it in rb_w32_rewinddir should suffice. This bug seemed to never got introduced into the 1.9 branch. ---------------------------------------- http://redmine.ruby-lang.org