develooper Front page | perl.perl5.porters | Postings from December 2012

[perl #116192] Small bug in include directory slash interpretation

Thread Previous | Thread Next
From:
Victor Efimov via RT
Date:
December 27, 2012 21:23
Subject:
[perl #116192] Small bug in include directory slash interpretation
Message ID:
rt-3.6.HEAD-17500-1356641652-1442.116192-15-0@perl.org
.. 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=116192

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About