pkgsrc-Users archive

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

Re: Printing on NetBSD: Converting xml to ppd



Hello Mayuresh,

Mayuresh writes:
> [...]
> I find that any foomatic-ppd command results in the following error:
>
> # foomatic-ppdfile list
> [1]   Abort trap (core dumped) /usr/pkg/bin/foo... |
>       Done(1)                 /usr/pkg/bin/foo...
> Could not run "foomatic-combo-xml"/"foomatic-perl-data"!
>
>
> Is above the right way to get a ppd? Does above error appear to be some
> system configuration problem?
> [...]

No, I think it wasn't a system configuration problem. The actual
problem probably was something like that (in `/var/log/messages'):

 | Jul 20 21:00:11 host -: host foomatic-combo-xml - - - buffer overflow detected; terminated

If we rebuild foomatic-db-engine with `CFLAGS=-g INSTALL_UNSTRIPPED=yes'
we can see:

 | % foomatic-ppdfile list
 | [1]   Abort trap (core dumped) /usr/pkg/bin/foo... |
 |       Done(1)                 /usr/pkg/bin/foo...
 | Could not run "foomatic-combo-xml"/"foomatic-perl-data"!
 | % gdb -core foomatic-combo-x.core `which foomatic-combo-xml`
 | Reading symbols from /usr/pkg/bin/foomatic-combo-xml...done.
 | [New process 1]
 | Core was generated by `foomatic-combo-x'.
 | Program terminated with signal SIGABRT, Aborted.
 | #0  0x00007cdf4032924a in _lwp_kill () from /usr/lib/libc.so.12
 | (gdb) bt
 | #0  0x00007cdf4032924a in _lwp_kill () from /usr/lib/libc.so.12
 | #1  0x00007cdf40305e5a in __fail (msg=msg@entry=0x7cdf4033d550 "buffer overflow detected; terminated")
 |     at /usr/src/lib/libc/misc/stack_protector.c:103
 | #2  0x00007cdf40305e90 in __chk_fail () at /usr/src/lib/libc/misc/stack_protector.c:116
 | #3  0x00007cdf402fb8a2 in __strcpy_chk (dst=0x7f7fff27c8c0 "Apple-12_640ps", src=0x7f7fff27c8c0 "Apple-12_640ps", slen=256)
 |     at /usr/src/lib/libc/ssp/strcpy_chk.c:49
 | #4  0x000000000040503a in parse (data=data@entry=0x7f7fff390e90, pid=pid@entry=0x408ce4 "c", driver=driver@entry=0x0,
 |     filename=filename@entry=0x7f7fff3916a0 "/usr/pkg/share/foomatic/db/source/driver/Postscript.xml",
 |     printerlist=printerlist@entry=0x7f7fff390e98, operation=operation@entry=3, defaultsettings=0x0, num_defaultsettings=0,
 |     nopjl=0x7f7fff390e84, idlist=0x7cdf40601060, debug=0) at foomatic-combo-xml.c:1486
 | #5  0x0000000000407e39 in main (argc=<optimized out>, argv=<optimized out>) at foomatic-combo-xml.c:2464

In the 4th frame, what happens is a `strcpy(s, s)' but according
to strcpy(3) man page *dst and *src should not overlap.

foomatic-db-engine-4.0.12nb9 contains a fix for that problem.


Back to the original problem... I have done something similar but
I think it wasn't from XML:

 <https://mail-index.NetBSD.org/pkgsrc-users/2015/06/14/msg021665.html>


Home | Main Index | Thread Index | Old Index