> From [EMAIL PROTECTED] Thu Aug 17 10:53:33 2000
> To: [EMAIL PROTECTED]
> Subject: LPRng: LPRng 3.6.23 dumps core
> Date: Thu, 17 Aug 2000 11:57:00 -0500
> From: John Perkins <[EMAIL PROTECTED]>
>
> This from a core file I found in one of the spool directories I'm trying to
> set up with 3.6.23:
>
> gdb -c core /s/lprng-3.6-2/src/@sys/LPRng-3.6.23/src/lpd
> GNU gdb 19990510
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i386-pc-solaris2.6"...
> Core was generated by `/s/lprng-3.6-2/sbin/lpd'.
> Program terminated with signal 11, Segmentation Fault.
> Reading symbols from /s/krb5/lib/libkrb5.so.1.0...done.
> Reading symbols from /s/krb5/lib/libcrypto.so.1.0...done.
> Reading symbols from /s/krb5/lib/libcom_err.so.1.0...done.
> Reading symbols from /usr/lib/libsocket.so.1...done.
> Reading symbols from /usr/lib/libnsl.so.1...done.
> Reading symbols from /usr/lib/libc.so.1...done.
> Reading symbols from /usr/lib/libgen.so.1...done.
> Reading symbols from /usr/lib/libdl.so.1...done.
> Reading symbols from /usr/lib/libmp.so.2...done.
> Reading symbols from /usr/lib/nss_files.so.1...done.
> #0 0x8062892 in Write_fd_str (fd=4,
> msg=0x3d6c6564 <Address 0x3d6c6564 out of bounds>)
> at ./common/utilities.c:160
> #1 0x805d88e in Print_different_last_status_lines (sock=0x804779c, fd=7,
> status_lines=0, max_size=10) at ./common/lpd_status.c:1278
> #2 0x805d4a6 in Get_queue_status (tokens=0x804773c, sock=0x804779c,
> displayformat=4, status_lines=0, done_list=0x8047724, max_size=10,
> hash_key=0x80c4150 "4") at ./common/lpd_status.c:1189
> #3 0x805a04b in Job_status (sock=0x804779c, input=0x8047869 "3a-duplex")
> at ./common/lpd_status.c:202
> #4 0x8057f92 in Dispatch_input (talk=0x804779c,
> input=0x8047868 "\0043a-duplex") at ./common/lpd.c:652
> #5 0x8057f1d in Service_connection (args=0x8047b2c) at ./common/lpd.c:631
> #6 0x80590ac in Do_work (args=0x8047b2c) at ./common/lpd.c:1183
> #7 0x8058f28 in Make_lpd_call (passfd=0x8047b20, args=0x8047b2c)
> at ./common/lpd.c:1149
> #8 0x805937c in Start_worker (parms=0x8047bfc, fd=9) at ./common/lpd.c:1267
> #9 0x80578bc in main (argc=1, argv=0x8047d30, envp=0x8047d38)
> at ./common/lpd.c:466
> #10 0x8056883 in _start ()
>
> This probably shouldn't be happening...
>
> Printcap from the printer in question:
>
> Printer: 3a-duplex@thugbert
> 3a-duplex|Postscript-3a-duplex|3rd floor HP LaserJet 8100DN printer (normal
> duplex mode)|HP 8100DN on 3rd floor in "normal" duplexing mode
> :bq=3a
> :check_for_nonprintable@
> :db=1
> :destinations=3a
> :filter=/s/lprng-3.6-2/lib/filters/ifhp
> :fx=flpv
> :ifhp=duplex,model=hp8100,pjl@,sync@,pagecount@
> :lf=/var/log/lprng/%P-log
> :mail_from=root
> :max_log_file_size#0
> :mc#10
> :mx#0
> :rm=hobbes.cs.wisc.edu
> :rp=3a-duplex
> :sd=/usr/spool/%P
> :server
> :xt@
>
> System info: Solaris 7/X86, LPRng-3.6.23, ifhp-3.3.20
>
> --
> ============================================================================
> John Perkins | University of Wisconsin-Madison
> Associate Researcher | Department of Computer Science
> [EMAIL PROTECTED] | 1210 W. Dayton St.
> 608-262-0438/608-262-9997 FAX | Madison, WI 53706-1685
> ============================================================================
Apply the following patch and tell me if this works:
*** common/lpd_status.c 2000/08/11 15:10:07 5.15
--- common/lpd_status.c 2000/08/18 01:42:52
***************
*** 8,14 ****
***************************************************************************/
static char *const _id =
! "$Id: lpd_status.c,v 5.15 2000/08/11 15:10:07 papowell Exp $";
#include "lp.h"
--- 8,14 ----
***************************************************************************/
static char *const _id =
! "$Id: lpd_status.c,v 5.15 2000/08/11 15:10:07 papowell Exp papowell $";
#include "lp.h"
***************
*** 1274,1280 ****
/* we print from i-1-(status_lines-1) to i-1 */
start = i-status_lines;
if( start <= last_printed ) start = last_printed + 1;
! for( j = last_printed; j < i; ++j ){
if( Write_fd_str(*sock,l.list[j]) < 0 ) cleanup(0);
if( Write_fd_str(*sock,"\n") < 0 ) cleanup(0);
}
--- 1274,1280 ----
/* we print from i-1-(status_lines-1) to i-1 */
start = i-status_lines;
if( start <= last_printed ) start = last_printed + 1;
! for( j = start; j < i; ++j ){
if( Write_fd_str(*sock,l.list[j]) < 0 ) cleanup(0);
if( Write_fd_str(*sock,"\n") < 0 ) cleanup(0);
}
-----------------------------------------------------------------------------
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------