Menu

#199 Potential Infinite Loop in FileLocationClient.java

v1.2.1
closed-fixed
None
5
2008-07-26
2008-01-28
No

The while loop beginning at line 102 in net.sourceforge.texlipse.viewer.util.FileLocationClient.java will loop infinitely when passed a malformed command string. I experienced this when using Skim on MacOSX to do inverse searching on a document with a space in its path. I neglected to wrap the %file parameter in the Skim command with double quotes which resulted in an additional parameter between the file and the line (the second part of the file name after the space).

I recommend adding a fourth, unqualified 'else' branch at line 115 to handle any cases where the arguments are not what was expected. From my point of view, it would be most helpful if the new branch could send an error message to the FileLocationServer so that it could display an error to the user (me) in Eclipse so I would know I had set the command incorrectly in my viewer. In any case, it would be good to at least consume the offending argument so that the loop can terminate.

Discussion

  • Boris von Loesch

    • assigned_to: nobody --> borisvl
    • status: open --> open-fixed
     
  • Boris von Loesch

    Logged In: YES
    user_id=343531
    Originator: NO

    The bug is fixed and the fix was checked into cvs. Remark, that
    it could last one day until the anonymous cvs is also updated.

     
  • Daniel Delorey

    Daniel Delorey - 2008-02-26

    Logged In: YES
    user_id=1341193
    Originator: YES

    Looks good. Thanks for the fix.

     
  • Boris von Loesch

    Logged In: YES
    user_id=343531
    Originator: NO

    Fixed in latest release, please update your TeXlipse.

     
  • Boris von Loesch

    • status: open-fixed --> closed-fixed
     

Log in to post a comment.