OSDN Git Service
(root)
/
android-x86
/
external-exfat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7a44ff
)
Check EOD entry presence.
author
relan
<relan@users.noreply.github.com>
Wed, 31 Aug 2011 16:30:41 +0000
(16:30 +0000)
committer
relan
<relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:13 +0000
(08:26 +0300)
libexfat/node.c
patch
|
blob
|
history
diff --git
a/libexfat/node.c
b/libexfat/node.c
index
fa9e572
..
d433b44
100644
(file)
--- a/
libexfat/node.c
+++ b/
libexfat/node.c
@@
-108,6
+108,12
@@
static int fetch_next_entry(struct exfat* ef, const struct exfat_node* parent,
/* fetch the next cluster if needed */
if ((it->offset & (CLUSTER_SIZE(*ef->sb) - 1)) == 0)
{
+ if (it->offset >= parent->size)
+ {
+ exfat_error("missing EOD entry (0x%"PRIx64", 0x%"PRIx64")",
+ it->offset, parent->size);
+ return 1;
+ }
it->cluster = exfat_next_cluster(ef, parent, it->cluster);
if (CLUSTER_INVALID(it->cluster))
{