]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fix potential divide by zero bug caused by a lxcfs bug master next
authorTheodore Ts'o <tytso@mit.edu>
Thu, 2 May 2024 16:23:44 +0000 (12:23 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 2 May 2024 16:23:44 +0000 (12:23 -0400)
commitb88b3b46cf1cfd4f0682374918fb3ba4aa0decdd
tree62208a506854f34fcf0c714b032f11f85e101078
parent66b0b3c1fc6262605d38f443641cdb9ab09d14e2
libext2fs: fix potential divide by zero bug caused by a lxcfs bug

If sysconf(_SC_NPROCESSORS_CONF) returns zero, this can cause a divide
by zero.  Make ext2fs_rw_bitmaps() more robust defaulting to 4 threads
if _SC_NPROCESSORS_CONF returns an invalid value.

https://github.com/tytso/e2fsprogs/issues/114
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/rw_bitmaps.c