[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dvipng] dvipng crash in stringrgb function
From: |
Ahzo |
Subject: |
Re: [Dvipng] dvipng crash in stringrgb function |
Date: |
Fri, 28 Jun 2019 23:34:10 +0200 (CEST) |
Hi,
Thanks for your quick reply!
Unfortunately, when I tried to built from current git HEAD, autoreconf failed:
$ autoreconf
/usr/bin/m4:acinclude.m4:295: ERROR: end of file in string
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
It seems commit 980ba1d broke acinclude.m4. Restoring it to the previous state
lets autoreconf succeed again.
Thus I can confirm that the stringrgb crash is now fixed.
However, I found another crash:
$ dvipng -pp- -
This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson
Usage: dvipng [OPTION]... FILENAME[.dvi]
[...]
# = number f = file s = string * = suffix, '0' to turn off
c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)
Segmentation fault
This can be avoided by validating the dvi pointer, before trying to access it:
--- a/draw.c
+++ b/draw.c
@@ -313,11 +313,12 @@ static void DrawPage(dviunits hoffset, dviunits voffset)
void DrawPages(void)
{
- struct page_list *dvi_pos;
+ struct page_list *dvi_pos = NULL;
pixels x_width,y_width,x_offset,y_offset;
int pagecounter=(option_flags & DVI_PAGENUM)?0:10;
- dvi_pos=NextPPage(dvi,NULL);
+ if (dvi!=NULL)
+ dvi_pos=NextPPage(dvi,NULL);
if (dvi_pos!=NULL) {
while(dvi_pos!=NULL) {
SeekPage(dvi,dvi_pos);
Best,
Ahzo