libextractor

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

commit 4e76f6c9050ade242528b29b2a02585135989684
parent 4fd401abb1fae22880f5f5fb4244cff2d4009bfe
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 12 Feb 2008 05:59:12 +0000

cleanup

Diffstat:
MAUTHORS | 2++
MChangeLog | 7+++++++
Msrc/main/extractor.c | 2+-
Msrc/plugins/flacextractor.c | 2+-
Msrc/plugins/pack.c | 6+++++-
Msrc/plugins/pdfextractor.c | 3++-
6 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/AUTHORS b/AUTHORS @@ -50,6 +50,7 @@ Heikki Lindholm <holindho@cs.helsinki.fi> Heiko Wundram <modelnine@ceosg.de> Ronan MELENNEC <ronan.melennec@cena.fr> Vasil Dimov <vd@freebsd.org> +Pavol Rusnak <prusnak@suse.cz> Translations: German - Karl Eichwalder <ke@gnu.franken.de> @@ -77,3 +78,4 @@ ogg-vorbis - glib - libltdl - gtk (pixbuf)- +libflac - diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +Mon Feb 11 22:58:48 MST 2008 + Various minor code cleanups. + +Sat Jan 12 14:14:32 MST 2008 + Fixed security issues in XPDF-based PDF extractor. + Releasing libextractor 0.5.19a. + Mon Jan 7 08:46:40 MST 2008 Releasing libextractor 0.5.19. diff --git a/src/main/extractor.c b/src/main/extractor.c @@ -339,8 +339,8 @@ get_path_from_proc_exe() { return cut_lib(strdup(dir)); } } + fclose(f); } - fclose(f); snprintf(fn, 64, "/proc/%u/exe", diff --git a/src/plugins/flacextractor.c b/src/plugins/flacextractor.c @@ -276,7 +276,7 @@ libextractor_flac_extract (const char *filename, if (false == FLAC__stream_decoder_set_metadata_respond_all(decoder)) { FLAC__stream_decoder_delete(decoder); - return le_cls.prev; + return prev; } le_cls.prev = prev; le_cls.prev = prev; diff --git a/src/plugins/pack.c b/src/plugins/pack.c @@ -357,7 +357,10 @@ cat_unpack (const void *buf, const char *fmt, ...) len |= *bp++; if (len > maxlen) - return -1; + { + va_end (ap); + return -1; + } memmove (arr, bp, len); bp += len; @@ -487,6 +490,7 @@ cat_unpack (const void *buf, const char *fmt, ...) int j; for (j = 0; j < i; j++) free (cbvp[i].data); + va_end (ap); return -1; } diff --git a/src/plugins/pdfextractor.c b/src/plugins/pdfextractor.c @@ -410,7 +410,8 @@ libextractor_pdf_extract (const char *filename, pos += 20 * xinfo - xstart; memcpy (buf, &data[pos], 20); buf[20] = '\0'; - sscanf (buf, "%10llu %*5u %*c", &info_offset); + if (1 != sscanf (buf, "%10llu %*5u %*c", &info_offset)) + return prev; break; } xrefpos = 20 * xcount + pos;