aboutsummaryrefslogtreecommitdiff
path: root/tiffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'tiffer.h')
-rw-r--r--tiffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tiffer.h b/tiffer.h
index 1122773..b4e582e 100644
--- a/tiffer.h
+++ b/tiffer.h
@@ -161,7 +161,7 @@ static bool
tiffer_subifd(
const struct tiffer *self, uint32_t offset, struct tiffer *subreader)
{
- if (self->end - self->begin < offset)
+ if (self->begin > self->end || self->end - self->begin < offset)
return false;
*subreader = *self;