From 3d7933462d3e0017052cf23168e946453aa7bc4e Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Wed, 5 Aug 2020 18:43:29 -0600 Subject: * Crash when Alpine frees memory on a system where LC_CTYPE is not configured, and the user calls the file browser to attach files to a message. Reported by Luis Gerardo Tejero. --- pith/charconv/utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pith/charconv/utf8.c') diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c index 2bb301c7..e1f16b3f 100644 --- a/pith/charconv/utf8.c +++ b/pith/charconv/utf8.c @@ -283,7 +283,7 @@ convert_to_utf8(char *str, char *fromcharset, int flags) } /* else no conversion necessary */ - if(result.data) + if(result.data && result.data != src.data) fs_give((void **) &result.data); result.size = 0; -- cgit v1.2.3-54-g00ecf