Module Name: src Committed By: kamil Date: Wed Jul 25 22:07:59 UTC 2018
Modified Files: src/sys/fs/msdosfs: msdosfs_fat.c Log Message: Avoid undefined behavior semantics in msdosfs_fat.c Do not change signedness bit with left shift. While there avoid signed integer overflow. Address both issues with using unsigned type. msdosfs_fat.c:512:42, left shift of 1 by 31 places cannot be represented in type 'int' msdosfs_fat.c:521:44, left shift of 1 by 31 places cannot be represented in type 'int' msdosfs_fat.c:744:14, left shift of 1 by 31 places cannot be represented in type 'int' msdosfs_fat.c:744:24, signed integer overflow: -2147483648 - 1 cannot be represented in type 'int [20]' msdosfs_fat.c:840:13, left shift of 1 by 31 places cannot be represented in type 'int' msdosfs_fat.c:840:36, signed integer overflow: -2147483648 - 1 cannot be represented in type 'int [20]' Detected with micro-UBSan in the user mode. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/fs/msdosfs/msdosfs_fat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.