From 8fce7ce1619ad6cbcc47a7f6747d57eb37184eb2 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 10 Dec 2016 20:19:22 -1000 Subject: [PATCH] utf8proc null-pointer handling --- include/utf8proc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/utf8proc.h b/include/utf8proc.h index 947595c..5372e7d 100644 --- a/include/utf8proc.h +++ b/include/utf8proc.h @@ -278,7 +278,7 @@ public: { UTF8Iterator it(m_it); size_t ret = 0; - while (it.iter() < end) + while (it.iter() < end && *it != '\0') { ++ret; ++it;