Whamcloud - gitweb
libext2fs: fix UBSan when updating an inline_data file
authorTheodore Ts'o <tytso@mit.edu>
Mon, 4 Nov 2019 23:43:49 +0000 (18:43 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 4 Nov 2019 23:43:49 +0000 (18:43 -0500)
commit41c05c9dc26a87bf0ffea64976be1a34dd542056
tree1c24d317685d545bdd9b84badcbd87ac5bf264e9
parent9bfbf1d5b93388d62a7f0eb498ab30d7a6aab871
libext2fs: fix UBSan when updating an inline_data file

What memcpy does when the length is zero is not well-defined.  So
avoid it.

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