.. or even better if (dirlen && *(tmp-1) != '/') { ... } On Thu Dec 27 12:49:17 2012, alh wrote: > On Thu, Dec 27, 2012 at 10:45 AM, Matthew Horsfall via RT < > perlbug-followup@perl.org> wrote: > > > I've attached a patch that I believe solves this, though I'm not sure of > > its portability on windows. Someone with more experience about how Perl > > behaves in that regard would be useful. > > > > Also, I've tested it through t/run/switchM.t, though the bug is really > > in "require", so that might not be appropriate. > > > > Hope this helps regardless. > > > > -- Matthew Horsfall (alh) > > > > > > --- > > via perlbug: queue: perl5 status: open > > https://rt.perl.org:443/rt3/Ticket/Display.html?id=116192 > > > > Now that I look at this, is it possible for *(tmp-1) to access bad memory? > Would "if (!dirlen || *(tmp-1) != '/') { ... } be better? > > -- Matthew Horsfall (alh) --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=116192Thread Previous | Thread Next