libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 58342d7c41eb6c2fb58b187bec84db28eaffe11d
parent e9345f19a5c035597de2edba17788a543ccb501d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 21 Dec 2009 11:45:44 +0000

fixing CID 199

Diffstat:
Msrc/plugins/ps_extractor.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/ps_extractor.c b/src/plugins/ps_extractor.c @@ -151,7 +151,8 @@ EXTRACTOR_ps_extract (const char *data, "%%EndComments", this should allow us to not read through most of the file for all the sane applications... For Windows-generated PS files, we will bail out at the end of the file. */ - while (0 != strncmp ("%%EndComments", line, strlen ("%%EndComments"))) + while ( (line == NULL) || + (0 != strncmp ("%%EndComments", line, strlen ("%%EndComments"))) ) { free (line); line = readline (data, size, pos);