summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-08-10 04:43:25 +0000
committerRoland McGrath <roland@gnu.org>2001-08-10 04:43:25 +0000
commitff09a44bc18177ba1253a8d3e1c9fbe3ebe5b768 (patch)
treedeb80de086fff2a51b7d7355c47cf28e714f19a7 /ext2fs
parenta9061b45e38b08af2c8d04f5bf1994a93d536779 (diff)
2001-08-09 Roland McGrath <roland@frob.com>
* inode.c (diskfs_get_translator): Fail with EFTYPE if the length field stored on disk is unreasonable. Don't crash on ENOMEM. Use memcpy instead of bcopy.
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index a3483c00..12e249e4 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -726,7 +726,7 @@ diskfs_get_translator (struct node *np, char **namep, unsigned *namelen)
datalen =
((unsigned char *)transloc)[0] + (((unsigned char *)transloc)[1] << 8);
- if (datalen > block_size)
+ if (datalen > block_size - 2)
err = EFTYPE; /* ? */
else
{