This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Plug segfault in bsd_glob() with unsupported ALTDIRFUNC flag.
authorCraig A. Berry <craigberry@mac.com>
Fri, 19 Aug 2011 15:14:13 +0000 (10:14 -0500)
committerCraig A. Berry <craigberry@mac.com>
Sat, 3 Sep 2011 12:58:32 +0000 (07:58 -0500)
commit3c97495f56fb647c187ea86b3486f83e2a360144
tree55193c4fd15a041013905c589e113f6eb561ae61
parent457f72034425ae46e400ba8bc323faeac268c51f
Plug segfault in bsd_glob() with unsupported ALTDIRFUNC flag.

First, disable all the unsupported flags just to make sure they aren't
triggering something they shouldn't be.  Also, zero the pglob struct
before passing to bsd_glob(); it contains function pointers, and it's
safest if they are null rather than containing random stack data.

Bug reported by ClĂ©ment Lecigne <clemun@gmail.com>.
ext/File-Glob/Glob.pm
ext/File-Glob/Glob.xs
ext/File-Glob/t/basic.t