From a9d9ff7ee12e00c9caf977f36665e6c2fd0ce27a Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 27 Feb 2018 22:15:54 -0500 Subject: [PATCH] libext2fs: declare local functions static to avoid namespace leakage The functions, xattr_array_update() and space_used() were accidentally allowed to be declared extern and were thus made available via the shared library. Fix this. Signed-off-by: Theodore Ts'o --- lib/ext2fs/ext_attr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c index f4cc2d0..89c5f2c 100644 --- a/lib/ext2fs/ext_attr.c +++ b/lib/ext2fs/ext_attr.c @@ -1382,9 +1382,11 @@ static int xattr_find_position(struct ext2_xattr *attrs, int count, return i; } -errcode_t xattr_array_update(struct ext2_xattr_handle *h, const char *name, - const void *value, size_t value_len, int ibody_free, - int block_free, int old_idx, int in_inode) +static errcode_t xattr_array_update(struct ext2_xattr_handle *h, + const char *name, + const void *value, size_t value_len, + int ibody_free, int block_free, + int old_idx, int in_inode) { struct ext2_xattr tmp; int add_to_ibody; @@ -1492,7 +1494,7 @@ add_new: return 0; } -int space_used(struct ext2_xattr *attrs, int count) +static int space_used(struct ext2_xattr *attrs, int count) { int total = 0; struct ext2_xattr *x; -- 1.8.3.1