dvipng
[Top][All Lists]
Advanced

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

Re: [Dvipng] dvipng crash in stringrgb function


From: Jan-Åke Larsson
Subject: Re: [Dvipng] dvipng crash in stringrgb function
Date: Mon, 1 Jul 2019 18:45:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

Thanks again. I'd rather do the test earlier in the code.

What is your name, so I can add you to the Credits?

/JÅ

On 2019-06-28 23:34, Ahzo wrote:
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


_______________________________________________
Dvipng mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dvipng
--
Jan-Åke Larsson
Professor, Head of Department


Linköping University
Department of Electrical Engineering
SE-581 83 Linköping
Phone: +46 (0)13-28 14 68
Mobile: +46 (0)13-28 14 68
Visiting address: Campus Valla, House B, Entr 27, 3A:482
Please visit us at www.liu.se

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]