]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
misc: fix strncpy length complaints
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 20:44:21 +0000 (15:44 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 26 Apr 2019 20:44:21 +0000 (15:44 -0500)
commit7f0d0b55f2c60bf46b9a1ecfa77f5f83d1cf17fa
treecddfa4659ec98f71f919a555db7b6c2bb04368d4
parent3d16890ebcfaf33b95ec2a64f5e412c9ec68f4c3
misc: fix strncpy length complaints

Fix a number of complaints about feeding sizeof(dest) directly to
strncpy.  We do this by feeding strncpy the length of the buffer minus
one, having checked that the allocated space are long enough.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
mkfs/xfs_mkfs.c
quota/edit.c