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 | b6dc2a97a52a2e7ba3cc14771f48a14d6de64fe5 (patch) | |
| tree | 3827d79c5ab7a85f809ff29bd85e40484b3a1dc9 | |
| parent | 2f1c418840a1ba5a7029cb6f21c30052195051bc (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.
| -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 { |
