#114 source does not enter 2-letters dirs

closed-duplicate
nobody
Browsing (93)
5
2005-10-31
2005-10-10
Anonymous
No

(LXR 0.9.4)

The source script refuses to enter a 2 letters dir
(such as 'fs' or 'mm' in linux kernel source tree).

The problem comes from a misuse of the dot in the
regexp used to filter out the .. (parent) dir.

Fixup : apply following patch (do not forget to apply
to the perl-mods
installed in the /usr/.../site_lisp perl directory if
you followd install directives)

--- LXR/Common.pm 2005-10-07 15:21:11.000000000 +0200
+++ LXR/Common.pm~ 2005-10-05 17:55:19.000000000 +0200
@@ -541,7 +541,7 @@
# First suppress anything after a dodgy
character
$path =~ s!(^[\w_+-,.%^/]+).*!$1!;
# Clean out /../
- while ($path =~ m!/\.\./!) {
+ while ($path =~ m!/../!) {
$path = s!/\.\./!/!g;
}
}

Discussion

  • Malcolm Box

    Malcolm Box - 2005-10-31

    Logged In: YES
    user_id=215386

    This has now been fixed in CVS.

    If you can install the new version and check that it solves your
    problem, then it would be very useful.

    Thanks for reporting this defect and helping to make LXR better.

     
  • Malcolm Box

    Malcolm Box - 2005-10-31
    • status: open --> closed
     
  • Malcolm Box

    Malcolm Box - 2005-10-31
    • status: closed --> closed-duplicate
     
  • Nick Jones

    Nick Jones - 2005-12-01

    Logged In: YES
    user_id=119409

    I just came upon this problem and this patch is backwards.
    It should read:

    --- LXR/Common.pm 2005-10-07 15:21:11.000000000 +0200
    +++ LXR/Common.pm 2005-10-05 17:55:19.000000000 +0200
    @@ -541,7 +541,7 @@
    # First suppress anything after a dodgy
    character
    $path =~ s!(^[\w_+-,.%^/]+).*!$1!;
    # Clean out /../
    - while ($path =~ m!/../!) {
    + while ($path =~ m!/\.\./!) {
    $path = s!/\.\./!/!g;
    }
    }

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks