Menu

#21 -r does not work for files with special characters

closed
nobody
None
5
2006-12-03
2004-04-01
No

For example:

$ echo 'test' > pound#pound
$ /usr/bin/lpr -Pmyprinter -r pound#pound

Warning - Error unlinking 'pound_pound' - No such file
or directory

In lpr.c (version 3.8.26), Check_files, line 1206
Clean_meta is called on a char* which still points to
the original filename in Files.list[0], thus corrupting
the filename and causing the error when unlink is
attempted later.

The attached patch fixes the problem by safestrdup-ing
the string before calling Clean_meta.

Discussion

  • John Williams

    John Williams - 2004-04-01

    patch for -r bug

     
  • grumpf_

    grumpf_ - 2006-12-03

    Logged In: YES
    user_id=1456210
    Originator: NO

    applied for 3.8.29

     
  • grumpf_

    grumpf_ - 2006-12-03
    • status: open --> closed
     
  • grumpf_

    grumpf_ - 2006-12-04

    Logged In: YES
    user_id=1456210
    Originator: NO

    applied for 3.8.29

     

Log in to post a comment.