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 20:04:16 +0000 (15:04 -0500)
commit1af4051e077438976a4c12a0622feaf6715bec77
tree9db08b5d17655bfc661b5a56db78828af35c38b0
parent2417db0fb29c260ae01503cff9af78540eeb4198
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