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>
Sun, 4 Sep 2011 21:14:28 +0000 (16:14 -0500)
commitd2457f2a596eb9f4f49750c56d95a24072d49759
tree6f27de45d0b3818035ab6de1179c0f63f1a6422b
parent558e0afd4ec40729992d42ffec33aff3aad855b1
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