bugGNU a2ps - Bugs: bug #64047, a2ps-lpr-wrapper exits on bogus...

 
 

bug #64047: a2ps-lpr-wrapper exits on bogus parameter-count test

Submitter:  None
Submitted:  Fri 14 Apr 2023 07:20:54 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 13 Mar 2024 02:15:02 PM UTC, comment #2: 

Apologies for taking so long to get to this bug report. I have fixed the bug in git and will make a new release shortly.

Reuben Thomas <rrt>
Group administrator
Mon 17 Apr 2023 07:53:49 PM UTC, comment #1: 

Attached is a patch which allows 'a2ps-lpr-wrapper'
to work properly.


(file #54635)

Anonymous
Fri 14 Apr 2023 07:20:54 PM UTC, original submission:  

With v4.15.4 of a2ps, trying to print anything fails with:

  $ a2ps -1 -s2 /etc/printcap
  [/etc/printcap (plain): 2 pages on 1 sheet]
  Usage: a2ps-lpr-wrapper [-d printer] FILE...
  a2ps: received SIGPIPE

The 'a2ps-lpr-wrapper' script exits prematurely due to a
bogus test of the parameter count following the 'getopts' loop:

  if [ $# -eq 0 ] ; then usage ; fi

As 'a2ps' supplies the data on STDIN, the parameter count
will always be zero, even if the only valid option of
"-d <printername>" is given.

If one runs 'a2ps-lpr-wrapper' directly, rather than being
forked from 'a2ps', any supplied filename(s) will simply be
printed using lp,lpr,rlpr as appropriate. Without any filenames,
it will read from STDIN.

Commenting out or deleting the above-mentioned test allows
printing with 'a2ps' to succeed.

The usage message should also be adjusted to reflect the
actual behavior.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54635:  patch-src_a2ps-lpr-wrapper added by None (622B - application/octet-stream - patch from NetBSD pkgsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rrt (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-13 rrt Open/ClosedOpen Closed
    2023-04-17 None Attached File- Added patch-src_a2ps-lpr-wrapper, #54635

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code