[tex-k] dvi2ps segfault based on bug in libkpathsea

Norbert Preining preining at logic.at
Tue Nov 9 15:04:00 CET 2010


Dear all, esp Karl,

Details can be found in Debian bug report 602566
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602566

dvi2ps dumps core on a simple dvi file on mipsel arch, quoting an
email in the bug report:
> The bug seems to come from libkpathsea5 and not from dvi2ps. It exists
> on all platforms (at least also on AMD64) but does not trigger a
> segfault. It comes from the kpse_set_suffixes function in the
> libkpathsea compatibility API which calls the kpathsea_set_suffixes
> function and passes to it its variable list of arguments. This operation
> is invalid in C.

In the bug report there is also a backtrace of the segfault and
two patches by Mathias Kende, quoting his email:
> The first patch duplicates some code in tex-file.c (approx. 15 lines),
> but is smaller and simpler. The second creates a helper function which
> reads properly a "va_list" list of arguments. Choose your preferred one.

I attach the two patches, both apply (with some fuzzyness) to current
sources in TeX Live.

What do others think?

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining            preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan                                 TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
BURNT YATES
Condition to which yates (q.v.) will suddenly pass without any
apparent interviewing period, after the spirit of the throckmorton
(q.v.) has finally been summoned by incessant throcking (q.v.)
			--- Douglas Adams, The Meaning of Liff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tex-file.c.duplicate-code.patch
Type: text/x-diff
Size: 1104 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-k/attachments/20101109/9411fa61/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tex-file.c.helper-function.patch
Type: text/x-diff
Size: 1496 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-k/attachments/20101109/9411fa61/attachment-0001.bin>


More information about the tex-k mailing list