hpijs.cpp fprintf segfault

Bug #441849 reported by Mark Purcell
258
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Medium
Unassigned
hplip (Debian)
Fix Released
Unknown

Bug Description

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542640

From: opter_l <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#542640: hpijs: segfault can't use my HP Deskjet 5940
Date: Fri, 21 Aug 2009 22:58:00 +0200

Hi,

I have corrected the segfault in hpijs :

--- hplip-2.8.6.b-orig/prnt/hpijs/hpijs.cpp 2008-07-23 03:33:17.000000000 +0200
+++ hplip-2.8.6.b/prnt/hpijs/hpijs.cpp 2009-08-21 22:25:07.761506689 +0200
@@ -58,7 +58,7 @@
    if ((n = vsnprintf(buf, 256, fmt, args)) == -1)
       buf[255] = 0; /* output was truncated */

- fprintf(stderr, buf);
+ fputs(buf, stderr);
    syslog(LOG_WARNING, buf);

    fflush(stderr);

The source of the segfault is in hpijs_set_cb() :

320 else
321 bug("unable to set key=%s, value=%s\n", key, svalue);

Where key and svalue are "user" input string from gs. You can see this in
my foomatic-rip log line 103 : "-sOutputFile=%stdout". The %s caused
fprintf to segfault...

Mark Purcell (msp)
visibility: private → public
Changed in hplip (Debian):
status: Unknown → New
Revision history for this message
David Suffield (david-suffield) wrote :

In the latest release this code section is no longer used.

Changed in hplip (Debian):
status: New → Confirmed
Changed in hplip (Debian):
status: Confirmed → Fix Released
Revision history for this message
Srikanth (srikanth-lokare) wrote :

This code section is no longer used in the latest release.

Thanks and Regards,
Srikanth Lokare

Changed in hplip:
status: New → Fix Committed
status: Fix Committed → Fix Released
Changed in hplip:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.