summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/IDN/LibIDNConverter.cpp')
-rw-r--r--Swiften/IDN/LibIDNConverter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/IDN/LibIDNConverter.cpp b/Swiften/IDN/LibIDNConverter.cpp
index 2325015..e2a87be 100644
--- a/Swiften/IDN/LibIDNConverter.cpp
+++ b/Swiften/IDN/LibIDNConverter.cpp
@@ -78,6 +78,9 @@ boost::optional<std::string> LibIDNConverter::getIDNAEncoded(const std::string&
78 if (idna_to_ascii_8z(domain.c_str(), &output, IDNA_USE_STD3_ASCII_RULES) == IDNA_SUCCESS) { 78 if (idna_to_ascii_8z(domain.c_str(), &output, IDNA_USE_STD3_ASCII_RULES) == IDNA_SUCCESS) {
79 std::string result(output); 79 std::string result(output);
80 free(output); 80 free(output);
81 if (result.size() > 255) {
82 return boost::optional<std::string>();
83 }
81 return result; 84 return result;
82 } 85 }
83 else { 86 else {