[gs-bugs] [Bug 691460] New: pdfapp_close have a bug

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Thu Jul 15 06:58:38 UTC 2010


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

           Summary: pdfapp_close have a bug
           Product: MuPDF
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P4
         Component: apps
        AssignedTo: tor.andersson at artifex.com
        ReportedBy: akay at 21cn.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0


pdfapp.c

on the function pdfapp_close(),

void pdfapp_close(pdfapp_t *app)
{
    if (app->cache)
        fz_freeglyphcache(app->cache);
    app->cache = nil;

    if (app->page)
        pdf_freepage(app->page);
    app->page = nil;

    if (app->image)
        fz_droppixmap(app->image);
    app->image = nil;

    if (app->outline)
        pdf_freeoutline(app->outline);
    app->outline = nil;

    if (app->xref->store)
        pdf_freestore(app->xref->store);
    app->xref->store = nil;

    pdf_closexref(app->xref);
    app->xref = nil;
}

when run here,maybe the application did not open pdf file,app->xref will NULL
    if (app->xref->store)
        pdf_freestore(app->xref->store);
    app->xref->store = nil;
    pdf_closexref(app->xref);

so,I think this will change to:
    if (app->xref)
    {
        if (app->xref->store)
            pdf_freestore(app->xref->store);
        app->xref->store = nil;
        pdf_closexref(app->xref);
    }

Please check it.

-- 
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