diff options
Diffstat (limited to 'utils/pdfseparate.cc')
-rw-r--r-- | utils/pdfseparate.cc | 4 |
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) { |