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

Bug#447081: Found bug solution proposed



Le jeudi 18 octobre 2007, Norbert Preining a écrit :
> > Run latex then dvips -z on the following file and dvips will segfault
> > look like a buffer overrun...
>
> I cannot confirm this:
>
> $ cat foo.tex
> \documentclass{article}
>
> \usepackage[hypertex]{hyperref}
>
> \begin{document}
>
> \href{/XXXX/XXXXXXX/XXX/XXXXX/XXXXXXXXXXXXXXX/XXXXXXX/XXXXXXXXXXXXXXXXX/XXX
>XXXXXXXXXXXXXXXXXXXXXXXXXX/XXXXXXXXXX XXXXX XXXXXXXXXXXXX -
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}{solot}
>
> \end{document}
> $ latex foo
> ...
> $ dvips foo
> This is dvips(k) 5.96.1 Copyright 2007 Radical Eye Software
> (www.radicaleye.com) ' TeX output 2007.10.18:0736' -> foo.ps
> </usr/share/texmf-texlive/dvips/base/tex.pro>
> </usr/share/texmf-texlive/dvips/base/texps.pro>
> </usr/share/texmf-texlive/dvips/base/special.pro>.
> </usr/share/texmf-texlive/fonts/type1/bluesky/cm/cmr10.pfb>[1]
> $
>
> No idea what has happened on your side, can you send the dvi file?

Found bug do not know how to patch using debian system...

File hpc.c
---------------------------
void stamp_hps P1C(Hps_link *, pl)
{
  char tmpbuf[200] ;         /*    <------- POTENTIAL BUG HERE malloc(strlen(pl->title)+200) safer */
  if (pl == NULL) {
    error("Null pointer, oh no!") ;
    return ;
  } else {
    /* print out the proper pdfm with local page info only 
     *  target info will be in the target dictionary */
    (void)sprintf(tmpbuf, 
		  " (%s) [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] pdfm ", pl->title, pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury,
		  pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4],
		  pl->color[0], pl->color[1], pl->color[2]) ;
    cmdout(tmpbuf) ; 
  }
  
}

/* For external URL's, we just pass them through as a string. The hyperps
 * interpreter can then do what is wants with them.
 */
void stamp_external P2C(char *, s, Hps_link *, pl) 
{
  char tmpbuf[200]; /*      BUG BUG HERE use malloc(strlen(s)+200) */
  if (pl == NULL) {
    error("Null pointer, oh no!") ;
    return ;
  } else {
    /* print out the proper pdfm with local page info only 
     *  target info will be in the target dictionary */
    (void)sprintf(tmpbuf," [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] (%s) pdfm ", pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury,
		  pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4],
		  pl->color[0], pl->color[1], pl->color[2], s) ;
    cmdout(tmpbuf) ;
  }
}

---------------------------------------------------
> Best wishes
>
> Norbert
>
> ---------------------------------------------------------------------------
>---- Dr. Norbert Preining <preining@logic.at>        Vienna University of
> Technology Debian Developer <preining@debian.org>                        
> Debian TeX Group gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76 
> A9C0 D2BF 4AA3 09C5 B094
> ---------------------------------------------------------------------------
>---- TIBSHELF (n.)
> Criss-cross wooden construction hung on a wall in a teenage girl's
> bedroom which is covered with glass bambies and poodles, matching pigs
> and porcelain ponies in various postures.
> 			--- Douglas Adams, The Meaning of Liff



-- 

"ROUCARIES Bastien"
                                                 bastien.roucaries@enseeiht.fr
-------------------------------------------------------------------------------


17:39 ou peut-on trouver des fortunes en francais ???
17:40 17:39 La banque de france ?




Reply to: