splash/Splash.cc | 4 ++-- utils/pdfseparate.cc | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-)
New commits: commit 7980fe868a8ef2ee3315f0bcb606c448d6604039 Author: William Bader <[email protected]> Date: Wed Feb 25 15:00:33 2015 +0100 Fix uninitialized variable in Splash::pipeRun Use useShape is actually the guard for shape, so use it in the if diff --git a/splash/Splash.cc b/splash/Splash.cc index 142516f..cac226d 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -15,7 +15,7 @@ // Copyright (C) 2005 Marco Pesenti Gritti <[email protected]> // Copyright (C) 2010-2014 Thomas Freitag <[email protected]> // Copyright (C) 2010 Christian Feuersänger <[email protected]> -// Copyright (C) 2011-2013 William Bader <[email protected]> +// Copyright (C) 2011-2013, 2015 William Bader <[email protected]> // Copyright (C) 2012 Markus Trippelsdorf <[email protected]> // Copyright (C) 2012 Adrian Johnson <[email protected]> // Copyright (C) 2012 Matthias Kramm <[email protected]> @@ -467,7 +467,7 @@ void Splash::pipeRun(SplashPipe *pipe) { //----- read destination pixel Guchar *destColorPtr; - if (pipe->shape && state->blendFunc && pipe->knockout && alpha0Bitmap != NULL) { + if (pipe->usesShape && state->blendFunc && pipe->knockout && alpha0Bitmap != NULL) { destColorPtr = alpha0Bitmap->data + (alpha0Y+pipe->y)*alpha0Bitmap->rowSize; switch (bitmap->mode) { case splashModeMono1: commit 57b6b78a0831fb31c06fd1bc6e9803de524f9d2d Author: Thomas Freitag <[email protected]> Date: Tue Feb 24 23:34:57 2015 +0100 pdfseparate: use always an unique instance for PDFDoc for savePageAs diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc index bc98c7d..9fa7052 100644 --- a/utils/pdfseparate.cc +++ b/utils/pdfseparate.cc @@ -4,7 +4,7 @@ // // This file is licensed under the GPLv2 or later // -// Copyright (C) 2011, 2012 Thomas Freitag <[email protected]> +// Copyright (C) 2011, 2012, 2015 Thomas Freitag <[email protected]> // Copyright (C) 2012-2014 Albert Astals Cid <[email protected]> // Copyright (C) 2013 Pino Toscano <[email protected]> // Copyright (C) 2013 Daniel Kahn Gillmor <[email protected]> @@ -124,12 +124,15 @@ bool extractPages (const char *srcFileName, const char *destFileName) { for (int pageNo = firstPage; pageNo <= lastPage; pageNo++) { snprintf (pathName, sizeof (pathName) - 1, destFileName, pageNo); GooString *gpageName = new GooString (pathName); - int errCode = doc->savePageAs(gpageName, pageNo); + PDFDoc *pagedoc = new PDFDoc (new GooString (srcFileName), NULL, NULL, NULL); + int errCode = pagedoc->savePageAs(gpageName, pageNo); if ( errCode != errNone) { delete gpageName; delete doc; + delete pagedoc; return false; } + delete pagedoc; delete gpageName; } delete doc;
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
