]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_scrub: guard against libicu returning negative buffer lengths
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:10 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:08 +0000 (17:01 -0700)
commit1072863bf085211c109f232c21e653091242d011
treec6c257255ffe6799eb870d294a1aab7a0e06dd8f
parentdcfea337c21acad47ccdc1ad6eb30480d0988e4c
xfs_scrub: guard against libicu returning negative buffer lengths

The libicu functions u_strFromUTF8, unorm2_normalize, and
uspoof_getSkeleton return int32_t values.  Guard against negative return
values, even though the library itself never does this.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/unicrash.c