[gs-bugs] [Bug 692282] pdf_show_string can overwrite xref's scratch buffer when called from pdf_run_stream

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Wed Jun 29 08:34:54 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=692282

--- Comment #2 from Elias Pipping <pipping at exherbo.org> 2011-06-29 08:34:54 UTC ---
(In reply to comment #1)
> Something like
> 
> --- a/pdf/pdf_interpret.c
> +++ b/pdf/pdf_interpret.c
> @@ -2138,8 +2138,10 @@ pdf_run_stream(pdf_csi *csi, fz_obj *rdb, fz_stream
> *file, char *buf, int buflen
>                                 pdf_show_space(csi, -fz_atof(buf) *
> gstate->size * 0.001f);
>                         }
>                         else if (tok == PDF_TOK_STRING)
> -                       {
> +                       {       /* cf.
> http://bugs.ghostscript.com/show_bug.cgi?id=692312 */
> +                               csi->in_array = 0;
>                                 pdf_show_string(csi, (unsigned char *)buf,
> len);
> +                               csi->in_array = 1;
>                         }
>                         else if (tok == PDF_TOK_KEYWORD)
>                         {
> 
> indeed fixes the issue for me, thanks. I still get
> 
> + pdf/pdf_xref.c:335: pdf_read_new_xref(): object id (37226 0 R) out of range
> (0..37225)
> | pdf/pdf_xref.c:411: pdf_read_xref(): cannot read xref (ofs=5260639)
> | pdf/pdf_xref.c:431: pdf_read_xref_sections(): cannot read xref section
> | pdf/pdf_xref.c:491: pdf_load_xref(): cannot read xref
> \ pdf/pdf_xref.c:532: pdf_open_xref_with_stream(): trying to repair
> 
> on startup. I this related?

oops. it's still early, so please ignore the above completely because I meant
to post it on another bug :)

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list