summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2017-02-07 23:21:29 +0000
committerChristos Zoulas <christos@zoulas.com>2017-02-07 23:21:29 +0000
commitc299a1daa7ef7bf49e7e334d60c489c4b6a82f2f (patch)
treeeee9695bde4748d11600f5afbb8310cf04488aab
parentc1ea652d9c3d4ae66d9561f309a8f3ef8c91b50b (diff)
downloadfile-git-c299a1daa7ef7bf49e7e334d60c489c4b6a82f2f.tar.gz
If we are reading a sector stream that is shorter than the minimum standard
stream size, but there is no short sector chain, adjust the dirlen.
-rw-r--r--src/cdf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cdf.c b/src/cdf.c
index 6764a427..47470b77 100644
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.87 2017/02/01 12:38:12 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.88 2017/02/07 23:21:29 christos Exp $")
#endif
#include <assert.h>
@@ -527,7 +527,7 @@ cdf_read_long_sector_chain(const cdf_info_t *info, const cdf_header_t *h,
ssize_t nr;
scn->sst_tab = NULL;
scn->sst_len = cdf_count_chain(sat, sid, ss);
- scn->sst_dirlen = len;
+ scn->sst_dirlen = MAX(h->h_min_size_standard_stream, len);
scn->sst_ss = ss;
if (sid == CDF_SECID_END_OF_CHAIN || len == 0)