]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fix infinite loop if copying in an empty directory
authorMatthias Andree <matthias.andree@gmx.de>
Thu, 21 Jul 2016 23:20:10 +0000 (01:20 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 23 Jul 2016 16:40:17 +0000 (12:40 -0400)
commitc2c5c58593f7e4944fcf57d07e66baaf6a82b11d
tree897260f2488c93b294107e97121905e1efdea565
parent32448f50df7d974ded956bbc78a419cf65ec09a3
libext2fs: fix infinite loop if copying in an empty directory

In m_minrootdir, on FreeBSD 9.3, try_lseek_copy() fails on an empty file
because errcode is uninitialized and the while() loop never executes,
and the errcode garbage is returned.

Initialize errcode = 0 in try_lseek_copy() to avoid a "fail" result when
there was nothing to copy.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/create_inode.c