diff options
-rw-r--r-- | ext2fs/inode.c | 2 | ||||
-rw-r--r-- | ufs/inode.c | 2 |
2 files changed, 2 insertions, 2 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 { diff --git a/ufs/inode.c b/ufs/inode.c index 28f18dbd..2098211f 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -613,7 +613,7 @@ diskfs_get_translator (struct node *np, char **namep, u_int *namelen) transloc = disk_image + fsaddr (sblock, blkno); datalen = *(u_int *)transloc; - if (datalen > sblock->fs_bsize) + if (datalen > sblock->fs_bsize - sizeof (u_int)) err = EFTYPE; else { |