summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2013-09-16 19:53:10 +0200
committerPino Toscano <pino@kde.org>2013-09-16 19:53:10 +0200
commit0f074b16317d874fe58d7042f8434282786ca757 (patch)
treef4f776af6f6f1e45ba85fc2dc8aaa75443173cda /utils
parentd2774325f5248018977d3ab8f8dd7155ed972668 (diff)
parentb8682d868ddf7f741e93b791588af0932893f95c (diff)
Merge remote-tracking branch 'origin/poppler-0.24'
Conflicts: utils/pdfimages.1
Diffstat (limited to 'utils')
-rw-r--r--utils/pdfseparate.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc
index 35ae0209..e41e547e 100644
--- a/utils/pdfseparate.cc
+++ b/utils/pdfseparate.cc
@@ -44,7 +44,7 @@ static const ArgDesc argDesc[] = {
};
bool extractPages (const char *srcFileName, const char *destFileName) {
- char pathName[1024];
+ char pathName[4096];
GooString *gfileName = new GooString (srcFileName);
PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL);
@@ -66,7 +66,7 @@ bool extractPages (const char *srcFileName, const char *destFileName) {
return false;
}
for (int pageNo = firstPage; pageNo <= lastPage; pageNo++) {
- sprintf (pathName, destFileName, pageNo);
+ snprintf (pathName, sizeof (pathName) - 1, destFileName, pageNo);
GooString *gpageName = new GooString (pathName);
int errCode = doc->savePageAs(gpageName, pageNo);
if ( errCode != errNone) {