diff options
author | Roland McGrath <roland@gnu.org> | 2001-08-10 04:43:25 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-08-10 04:43:25 +0000 |
commit | ff09a44bc18177ba1253a8d3e1c9fbe3ebe5b768 (patch) | |
tree | deb80de086fff2a51b7d7355c47cf28e714f19a7 /ufs | |
parent | a9061b45e38b08af2c8d04f5bf1994a93d536779 (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 'ufs')
-rw-r--r-- | ufs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |