Menu

#123 Filepath searching with regexes can cause crash

Version 5.10
closed-fixed
nobody
5
2014-07-18
2010-04-24
No

AbsFileFinder::GetFilePathsForPattern is calling SplitFilePath() on a pattern to figure out where to start the search. This will not work in general. A path pattern need bear no resemblance to an actual path at all. In fact, if the regex doesn't contain a path separator character, SplitFilePath() returns null, which will cause a crash.

Discussion

  • Michael Chisholm

    The crash due to null return value is fixed now, but the current practice of treating a regex like a plain filepath and splitting on the separator char still doesn't work. So it's slightly less broken now... fyi.

     
  • Michael Chisholm

    • status: open --> closed-fixed
    • Group: --> Version 5.10
     
  • Michael Chisholm

    This bug was specifically about the potential for a crash. It won't crash here anymore, so I'm closing out the bug, despite the fact that the algorithm still doesn't work. We should open a separate bug about that.

    The fix was in [r1199] on the filefinder_ops branch, which was reintegrated in [r1215].

     

    Related

    Commit: [r1199]
    Commit: [r1215]


    Last edit: Michael Chisholm 2014-07-18

Log in to post a comment.