Monday, October 31, 2022

Re: xpdf segs fault

On 2022/10/31 14:52, Walter Alejandro Iglesias wrote:
> On Oct 31 2022, Walter Alejandro Iglesias wrote:
> > On Oct 30 2022, Theo Buehler wrote:
> > > On Sun, Oct 30, 2022 at 11:04:20PM +0100, Theo Buehler wrote:
> > > > On Sun, Oct 30, 2022 at 09:00:53PM +0100, Walter Alejandro Iglesias wrote:
> > > > > Hello,
> > > > >
> > > > > I suppose I have to report this bug here.
> > > > >
> > > > > As far as I was aware Xpdf search dialog didn't support non ascii
> > > > > characters (as it also the case with mupdf). Lately I been using the
> > > > > xpopple version under debian, and I realized it now lets you do utf8
> > > > > searches.
> > > > >
> > > > > Happy with this xpdf improvement I tried to do the same under openbsd (I
> > > > > assume openbsd xpdf port is not the xpopple version, right?), it let me
> > > > > type some utf8 characters (spanish keyboard) in its search dialog but
> > > > > when I type characters with tilde Xpdf segs fault.
> > > >
> > > > It's a pretty bad out-of-bounds access in motif.
> >
> > I understand. I've been investigating how motif handles utf8, it seems
> > to be really entangled.
> >
> > > > The diff below makes
> > > > things work for me. Searching for spanish words with accents in xpdf
> > > > works for me with this diff.
> >
> > Your patch solves the segfault, and now I can type characters with tilde.
> > But keyboard input doesn't let me enter three bytes utf8 characters, like
> > mdash, quotes, ellipsis or euro sign. Is that blocked for some reason?
>
> The issue is explained here:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946270
>
> It seems motif asumes you're entering latin-1 characters even when they
> are utf-8. How do you generate patches for ports? Is there a cvs
> command to download the port's sources?

If you have the ports tree on your system, the steps are basically along
these lines:

make patch
cd `make show=WRKSRC`
cp foo.c foo.c.orig
vi foo.c
cd -
make update-patches

iff there is an existing patches/ directory then you can do this to
add a file (or similar if you want to remove a patch with 'cvs rm')

cd patches
cvs add patch-foo_c
cd -
cvs diff -uNp

If there is no existing patches/ directory there is also a way but
it's more awkward to do with anoncvs mirrors, so in that case for
people without a cvs account the easiest way is probably to send
a tar

No comments:

Post a Comment