[poppler] 2 commits - fofi/FoFiBase.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Jun 20 15:32:28 PDT 2011
fofi/FoFiBase.cc | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 706007431325b1e8c9bf4cba35c89511b10ebf0c
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon Jun 20 23:30:50 2011 +0100
(C) for Jim
diff --git a/fofi/FoFiBase.cc b/fofi/FoFiBase.cc
index abdfca7..5280838 100644
--- a/fofi/FoFiBase.cc
+++ b/fofi/FoFiBase.cc
@@ -14,6 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2008 Ed Avis <eda at waniasset.com>
+// Copyright (C) 2011 Jim Meyering <jim at meyering.net>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
commit e23384fbb3542941d2cf59ce6560913255ca2b01
Author: Jim Meyering <meyering at redhat.com>
Date: Mon Jun 20 11:09:01 2011 +0200
don't gmalloc(-1) upon ftell failure
* fofi/FoFiBase.cc: Diagnose ftell failure.
diff --git a/fofi/FoFiBase.cc b/fofi/FoFiBase.cc
index fe0b92e..abdfca7 100644
--- a/fofi/FoFiBase.cc
+++ b/fofi/FoFiBase.cc
@@ -62,6 +62,11 @@ char *FoFiBase::readFile(char *fileName, int *fileLen) {
return NULL;
}
n = (int)ftell(f);
+ if (n < 0) {
+ error(-1, "Cannot determine length of '%s'", fileName);
+ fclose(f);
+ return NULL;
+ }
if (fseek(f, 0, SEEK_SET) != 0) {
error(-1, "Cannot seek to start of '%s'", fileName);
fclose(f);
More information about the poppler
mailing list