From 1cf1232cd4721dc155a5cf7d571e5b1dae506430 Mon Sep 17 00:00:00 2001 From: Patsy Franklin Date: Tue, 29 Aug 2017 15:53:28 +0200 Subject: gconv: Consistently mangle NULL function pointers [BZ #22025] Not mangling NULL pointers is not safe because with very low probability, a non-NULL function pointer can turn into a NULL pointer after mangling. --- iconv/gconv_dl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'iconv/gconv_dl.c') diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c index 241836204d..d7dbba90a2 100644 --- a/iconv/gconv_dl.c +++ b/iconv/gconv_dl.c @@ -131,10 +131,8 @@ __gconv_find_shlib (const char *name) #ifdef PTR_MANGLE PTR_MANGLE (found->fct); - if (found->init_fct != NULL) - PTR_MANGLE (found->init_fct); - if (found->end_fct != NULL) - PTR_MANGLE (found->end_fct); + PTR_MANGLE (found->init_fct); + PTR_MANGLE (found->end_fct); #endif /* We have succeeded in loading the shared object. */ -- cgit v1.2.3