summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2009-09-05 17:23:44 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2009-09-05 17:23:44 +0000
commit644d294babf3f4aaef64ba19ac7abbaf9aa101cd (patch)
tree7093e8cfa9d8cbdbcd96c267eb881447242378fe
parent2c102ef711a8db1cd3ff00f84f4ec6019bccc751 (diff)
- don't try to shove a daddr64_t value into an int32_t.
eventhough this won't really harm as ext2fs doesn't handle files that large, it was not correct. no objections from thib@
-rw-r--r--sys/ufs/ext2fs/ext2fs_balloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_balloc.c b/sys/ufs/ext2fs/ext2fs_balloc.c
index f3ce1c4db0e..ff655ac2760 100644
--- a/sys/ufs/ext2fs/ext2fs_balloc.c
+++ b/sys/ufs/ext2fs/ext2fs_balloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_balloc.c,v 1.16 2009/08/21 17:48:38 jasper Exp $ */
+/* $OpenBSD: ext2fs_balloc.c,v 1.17 2009/09/05 17:23:43 jasper Exp $ */
/* $NetBSD: ext2fs_balloc.c,v 1.10 2001/07/04 21:16:01 chs Exp $ */
/*
@@ -60,15 +60,15 @@ ext2fs_buf_alloc(struct inode *ip, daddr64_t bn, int size, struct ucred *cred,
struct buf **bpp, int flags)
{
struct m_ext2fs *fs;
- int32_t nb;
struct buf *bp, *nbp;
struct vnode *vp = ITOV(ip);
struct indir indirs[NIADDR + 2];
- int32_t newb, lbn, *bap, pref;
+ int32_t nb, newb, *bap;
int num, i, error;
u_int deallocated;
int32_t *allocib, *blkp, *allocblk, allociblk[NIADDR + 1];
int unwindidx = -1;
+ daddr64_t lbn, pref;
*bpp = NULL;
if (bn < 0)