summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/load-gif.c34
-rw-r--r--source/fitz/load-tiff.c19
2 files changed, 9 insertions, 44 deletions
diff --git a/source/fitz/load-gif.c b/source/fitz/load-gif.c
index 46b2ba66..02c153f0 100644
--- a/source/fitz/load-gif.c
+++ b/source/fitz/load-gif.c
@@ -304,16 +304,7 @@ gif_read_gce(fz_context *ctx, struct info *info, unsigned char *p, unsigned char
static unsigned char *
gif_read_ce(fz_context *ctx, struct info *info, unsigned char *p, unsigned char *end)
{
- fz_try(ctx)
- {
- p = gif_read_subblocks(ctx, info, p + 2, end, NULL);
- }
- fz_catch(ctx)
- {
- fz_rethrow(ctx);
- }
-
- return p;
+ return gif_read_subblocks(ctx, info, p + 2, end, NULL);
}
static unsigned char*
@@ -323,17 +314,7 @@ gif_read_pte(fz_context *ctx, struct info *info, unsigned char *p, unsigned char
fz_throw(ctx, FZ_ERROR_GENERIC, "premature end in plain text extension in gif image");
if (p[2] != 0x0c)
fz_throw(ctx, FZ_ERROR_GENERIC, "out of range plain text extension block size in gif image");
-
- fz_try(ctx)
- {
- p = gif_read_subblocks(ctx, info, p + 15, end, NULL);
- }
- fz_catch(ctx)
- {
- fz_rethrow(ctx);
- }
-
- return p;
+ return gif_read_subblocks(ctx, info, p + 15, end, NULL);
}
/*
@@ -387,16 +368,7 @@ gif_read_ae(fz_context *ctx, struct info *info, unsigned char *p, unsigned char
fz_warn(ctx, "ignoring unsupported application extension '%s' in gif image", extension);
}
- fz_try(ctx)
- {
- p = gif_read_subblocks(ctx, info, p + 14, end, NULL);
- }
- fz_catch(ctx)
- {
- fz_rethrow(ctx);
- }
-
- return p;
+ return gif_read_subblocks(ctx, info, p + 14, end, NULL);
}
static void
diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c
index 819ed7fd..2002c61a 100644
--- a/source/fitz/load-tiff.c
+++ b/source/fitz/load-tiff.c
@@ -939,21 +939,14 @@ fz_load_tiff_subimage_count(fz_context *ctx, unsigned char *buf, int len)
unsigned subimage_count = 0;
struct tiff tiff = { 0 };
- fz_try(ctx)
- {
- fz_decode_tiff_header(ctx, &tiff, buf, len);
+ fz_decode_tiff_header(ctx, &tiff, buf, len);
- offset = tiff.ifd_offset;
+ offset = tiff.ifd_offset;
- do {
- subimage_count++;
- offset = fz_next_ifd(ctx, &tiff, offset);
- } while (offset != 0);
- }
- fz_catch(ctx)
- {
- fz_rethrow(ctx);
- }
+ do {
+ subimage_count++;
+ offset = fz_next_ifd(ctx, &tiff, offset);
+ } while (offset != 0);
return subimage_count;
}