[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grolbp crashes on empty input

From: Colin Watson
Subject: grolbp crashes on empty input
Date: Tue, 2 Jul 2013 10:36:24 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

The Mayhem team at CMU found that grolbp crashes when given input that
never creates a printer, for example 'grolbp /dev/null'.  This obviously
won't happen in normal use via groff, but it's still inelegant and
should be fixed.

2013-07-02  Colin Watson  <address@hidden>

        * src/devices/grolbp/lbp.cpp (main): Don't write trailer if no
        printer was created.

Index: src/devices/grolbp/lbp.cpp
RCS file: /sources/groff/groff/src/devices/grolbp/lbp.cpp,v
retrieving revision 1.13
diff -p -u -r1.13 lbp.cpp
--- src/devices/grolbp/lbp.cpp  5 Jan 2009 20:10:56 -0000       1.13
+++ src/devices/grolbp/lbp.cpp  2 Jul 2013 09:35:01 -0000
@@ -719,6 +719,7 @@ int main(int argc, char **argv)
   while (optind < argc)
-  lbpputs("\033c\033<");
+  if (lbpoutput)
+    lbpputs("\033c\033<");
   return 0;


Colin Watson                                       address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]