Bug 85233 - [pdfseparate] Near-eternal loop, 3 exabyte file output
Summary: [pdfseparate] Near-eternal loop, 3 exabyte file output
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 11:24 UTC by MH
Modified: 2014-10-21 09:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
disk-fill.pdf (2.38 KB, text/plain)
2014-10-20 11:24 UTC, MH
Details
check for EOF (812 bytes, patch)
2014-10-20 11:48 UTC, Adrian Johnson
Details | Splinter Review

Description MH 2014-10-20 11:24:26 UTC
Created attachment 108108 [details]
disk-fill.pdf

OS: Fedora 20 (running in virtualbox)
Dependencies installed with: yum-builddep poppler
Version: GIT Master
Command line for loop demonstration: master/utils/pdfseparate <attached.pdf> /dev/null
Command line for filling disk: master/utils/pdfseparate <attached.pdf> out-%d

Attached several files that repeat this, basically there's an output loop that attempts to write 3,695,785,924,655,524,693 bytes (3.6 exabytes) to disk. Should probably sanity check the size. Obviously minor bug.

  for (Goffset i = 0; i < length; i++) {
    int c = str->getUnfilteredChar();
    outStr->printf("%c", c);  
  }
  
  Here with attached file & command line length = 3695785924655524693
Comment 1 Adrian Johnson 2014-10-20 11:48:42 UTC
Created attachment 108113 [details] [review]
check for EOF
Comment 2 Thomas Freitag 2014-10-20 12:11:05 UTC
(In reply to Adrian Johnson from comment #1)
> Created attachment 108113 [details] [review] [review]
> check for EOF

Thanks, Adrian, looks well!
Comment 3 Carlos Garcia Campos 2014-10-20 17:44:51 UTC
Comment on attachment 108113 [details] [review]
check for EOF

Review of attachment 108113 [details] [review]:
-----------------------------------------------------------------

Looks good to me too.
Comment 4 Adrian Johnson 2014-10-21 09:48:12 UTC
Pushed


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.