diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-08-14 16:53:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-08-14 16:53:47 +0000 |
commit | 5e1200cd82ff8e247523f0ec5ccb68898d7ea14f (patch) | |
tree | 6450dc96e176788d800965b2b55210cfaca8cc96 | |
parent | b4ef30267b385b51949df757c5ae5a85d764cba3 (diff) | |
download | libextractor-5e1200cd82ff8e247523f0ec5ccb68898d7ea14f.tar.gz libextractor-5e1200cd82ff8e247523f0ec5ccb68898d7ea14f.zip |
bugfix in seek implementation
-rw-r--r-- | src/main/Makefile.am | 2 | ||||
-rw-r--r-- | src/main/extractor_datasource.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/Makefile.am b/src/main/Makefile.am index 8e8c086..0605eef 100644 --- a/src/main/Makefile.am +++ b/src/main/Makefile.am | |||
@@ -42,7 +42,7 @@ endif | |||
42 | PLUGINFLAGS = $(makesymbolic) $(LE_PLUGIN_LDFLAGS) | 42 | PLUGINFLAGS = $(makesymbolic) $(LE_PLUGIN_LDFLAGS) |
43 | 43 | ||
44 | EXTRA_DIST = \ | 44 | EXTRA_DIST = \ |
45 | iconv.c fuzz_default.sh fuzz_thumbnail.sh \ | 45 | iconv.c \ |
46 | test_file.dat \ | 46 | test_file.dat \ |
47 | test_file.dat.gz \ | 47 | test_file.dat.gz \ |
48 | test_file.dat.bz2 | 48 | test_file.dat.bz2 |
diff --git a/src/main/extractor_datasource.c b/src/main/extractor_datasource.c index bd26d1c..c01e62a 100644 --- a/src/main/extractor_datasource.c +++ b/src/main/extractor_datasource.c | |||
@@ -340,7 +340,7 @@ bfds_seek (struct BufferedFileDataSource *bfds, | |||
340 | (bfds->buffer_pos + pos >= 0) ) ) | 340 | (bfds->buffer_pos + pos >= 0) ) ) |
341 | { | 341 | { |
342 | bfds->buffer_pos += pos; | 342 | bfds->buffer_pos += pos; |
343 | return bfds->buffer_pos; | 343 | return bfds->buffer_pos + bfds->fpos; |
344 | } | 344 | } |
345 | if (0 != bfds_pick_next_buffer_at (bfds, | 345 | if (0 != bfds_pick_next_buffer_at (bfds, |
346 | bfds->fpos + bfds->buffer_pos + pos)) | 346 | bfds->fpos + bfds->buffer_pos + pos)) |