<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - cairo 1.14.12 hangs in read_png called from cairo_image_surface_create_from_png_stream on malformed png"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104325">104325</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cairo 1.14.12 hangs in read_png called from cairo_image_surface_create_from_png_stream on malformed png
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>png functions
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>cworth@cworth.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>orivej@gmx.fr
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is a regression since cairo 1.14.10 revealed by cairocffi tests.

With a PNG file truncated to 30 bytes [1], cairo 1.4.12 hangs on CPU in
read_png(), infinitely calling png_get_IHDR() and never reaching this line:
<a href="https://cgit.freedesktop.org/cairo/tree/src/cairo-png.c?h=1.14&id=d53db01d01a48c48a1633a8d531f979a99d316bd#n591">https://cgit.freedesktop.org/cairo/tree/src/cairo-png.c?h=1.14&id=d53db01d01a48c48a1633a8d531f979a99d316bd#n591</a>

The bug was introduced in
<a href="https://cgit.freedesktop.org/cairo/commit/?h=1.14&id=d53db01d01a48c48a1633a8d531f979a99d316bd">https://cgit.freedesktop.org/cairo/commit/?h=1.14&id=d53db01d01a48c48a1633a8d531f979a99d316bd</a>

To reproduce, run cairocffi tests against cairo on Linux.

Discovered at
<a href="https://github.com/NixOS/nixpkgs/commit/fc5756ea5e4a73624e0cfbb0e3eef247fc312547">https://github.com/NixOS/nixpkgs/commit/fc5756ea5e4a73624e0cfbb0e3eef247fc312547</a>

[1]
<a href="https://github.com/Kozea/cairocffi/blob/9cba2e6039869db6710a5fb6a1af0f139509fc00/cairocffi/test_cairo.py#L253">https://github.com/Kozea/cairocffi/blob/9cba2e6039869db6710a5fb6a1af0f139509fc00/cairocffi/test_cairo.py#L253</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>