Module Name: src Committed By: kamil Date: Sun Mar 8 17:38:12 UTC 2020
Modified Files: src/sys/ufs/ext2fs: ext2fs_vnops.c Log Message: Perform bit operations on unsigned integer ext2fs_vnops.c:1002:2, signed integer overflow: 510008 * 4294 cannot be represented in type 'int Maximum usec * 4294 is in the range of unsigned int. >>> 1000000*4294 4294000000 >>> 2**32 4294967296 Patch submitted by Nisarg S. Joshi. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/sys/ufs/ext2fs/ext2fs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/ext2fs/ext2fs_vnops.c diff -u src/sys/ufs/ext2fs/ext2fs_vnops.c:1.130 src/sys/ufs/ext2fs/ext2fs_vnops.c:1.131 --- src/sys/ufs/ext2fs/ext2fs_vnops.c:1.130 Wed Sep 18 17:59:15 2019 +++ src/sys/ufs/ext2fs/ext2fs_vnops.c Sun Mar 8 17:38:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_vnops.c,v 1.130 2019/09/18 17:59:15 christos Exp $ */ +/* $NetBSD: ext2fs_vnops.c,v 1.131 2020/03/08 17:38:12 kamil Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.130 2019/09/18 17:59:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_vnops.c,v 1.131 2020/03/08 17:38:12 kamil Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -999,7 +999,7 @@ ext2fs_vinit(struct mount *mntp, int (** */ getmicrouptime(&tv); SETHIGH(ip->i_modrev, tv.tv_sec); - SETLOW(ip->i_modrev, tv.tv_usec * 4294); + SETLOW(ip->i_modrev, tv.tv_usec * 4294U); *vpp = vp; return 0; }