Bug 95331 - pdfunite crash while open and write to the same file
Summary: pdfunite crash while open and write to the same file
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-10 03:26 UTC by Thomasy
Modified: 2018-08-21 10:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
damaged pdf file (15 bytes, text/plain)
2016-05-10 03:26 UTC, Thomasy
Details

Description Thomasy 2016-05-10 03:26:59 UTC
Created attachment 123589 [details]
damaged pdf file

Execute pdfunite design/force_sensor.pdf out.pdf using shell script and pdfunite will crash with message: 

Syntax Error: Couldn't find trailer dictionary
Internal Error (0): Call to Object where the object was type 5, not the expected type 7


##########

gdb debug info
pdfunite design/force_sensor.pdf out.pdf
GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pdfunite...Reading symbols from /usr/lib/debug/.build-id/d5/681490cf3a1a7b36229bafe2cdc992e80581bf.debug...done.
done.
(gdb) run
Starting program: /usr/bin/pdfunite design/force_sensor.pdf design/force_sensor.pdf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Syntax Error: Couldn't find trailer dictionary
Internal Error (0): Call to Object where the object was type 5, not the expected type 7

Program received signal SIGABRT, Aborted.
0xb7fdac31 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fdac31 in __kernel_vsyscall ()
#1  0xb7a4be89 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#2  0xb7a4d3e7 in __GI_abort () at abort.c:89
#3  0x0804ab30 in Object::getDict (this=0xbfffef38, this=0xbfffef38) at ../poppler/Object.h:209
#4  0x08049c88 in main (argc=3, argv=0xbffff054) at pdfunite.cc:247
(gdb)
Comment 1 Thomasy 2016-05-10 05:51:12 UTC
The crash can be trigger by pdfunite the same file for both input and output.


thomas@thomas-VirtualBox:/tmp$ pdfunite force_sensor.pdf  force_sensor.pdf 
Syntax Error: Couldn't find trailer dictionary
Internal Error (0): Call to Object where the object was type 5, not the expected type 7
已經終止 (core dumped)
Comment 2 GitLab Migration User 2018-08-21 10:34:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/265.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.