[cairo-bugs] [Bug 91381] New: bad free in tests/pdf-mime-data.c

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 17 19:37:50 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91381

            Bug ID: 91381
           Summary: bad free in tests/pdf-mime-data.c
           Product: cairo
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: chris at chris-wilson.co.uk
          Reporter: mclasen at redhat.com
        QA Contact: cairo-bugs at cairographics.org

In read_file(), we see:

    *data = malloc (*len);

    ...

    if (fread(*data, *len, 1, fp) != 1) {
      free(data);
      ...

The free call needs to be free(*data), to match the malloc call.

This was pointed out by coverity.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150718/ffd75b89/attachment.html>


More information about the cairo-bugs mailing list