[pdftohtml] Segfault when output set to /dev/null or other place with no write access
Submitted by MH
Assigned to poppler-bugs
Description
Created attachment 108301 example.pdf
OS: Fedora 20 (running in virtualbox) Dependencies installed with: yum-builddep poppler Version: GIT Master Command line for loop demonstration: master/utils/pdftohtml <attached.pdf> /dev/null
Note, repeats with all PDFs I tried (i.e. also not fuzzed ones). Tried also by making with root folder /new and writing there. Both GDB information attached. Also possible to repeat with:
mkdir out chmod 000 out master/utils/pdftohtml <any.pdf> out/out
############################################################################# GDB output:
Reading symbols from /home/foobar/poppler/utils/.libs/lt-pdftohtml...done. Starting program: /home/foobar/poppler/utils/.libs/lt-pdftohtml start.pdf /dev/null
I/O Error: Couldn't open html file '/dev/null.html' I/O Error: Couldn't open html file '/dev/null_ind.html'
Program received signal SIGSEGV, Segmentation fault.
############################################################################# GDB output:
Reading symbols from /home/foobar/poppler/utils/.libs/lt-pdftohtml...done. Starting program: /home/foobar/poppler/utils/.libs/lt-pdftohtml 1-pdftohtmlfuzz-10.pdf /new [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". I/O Error: Couldn't open html file '/new.html' I/O Error: Couldn't open html file '/new_ind.html'
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff5b71b60 in fwrite () from /lib64/libc.so.6
Attachment 108301, "example.pdf":
start.pdf