<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Out of bounds memory read when loading zero-bytes PDF"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103552#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Out of bounds memory read when loading zero-bytes PDF"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103552">bug 103552</a>
              from <span class="vcard"><a class="email" href="mailto:simon-freedesktop@exyr.org" title="simon-freedesktop@exyr.org">simon-freedesktop@exyr.org</a>
</span></b>
        <pre>Is “don’t do that” really the best answer to an out-of-bounds memory access bug
in a library routinely used with untrusted input from the Internet?

The reason I stumbled upon this bug is that I’d like to use Poppler to test a
library that generates PDF files. I started writing a test harness before I
wrote any library code, so the first input I tried with my Rust bindings to
Poppler was the empty byte vector.

Steps to reproduce: compile with gcc $(pkg-config --cflags --libs poppler-glib)

    #include "poppler.h"

    void main() {
        poppler_document_new_from_data((char*) 1, 0, NULL, NULL);
    }</pre>
        </div>
      </p>


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

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