diff --git a/lib/libedit/chartype.c b/lib/libedit/chartype.c index 9cb54ac11a7b..44fb953f8581 100644 --- a/lib/libedit/chartype.c +++ b/lib/libedit/chartype.c @@ -223,6 +223,7 @@ ct_mbrtowc(wchar_t *wc, const char *s, size_t n) size_t ct_mbrtowc(wchar_t *wc, const char *s, size_t n) +{ if (s == NULL) return 0; if (n == 0)