From 1b5801edf62f8bfed9a2f88e88a0195518ba4976 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 6 Sep 2015 21:15:23 -0700 Subject: linenoise: use checked allocator for strdup. * lib.c (chk_strdup_utf8): New function. * lib.h (chk_strdup_utf8): Declared. * linenoise/linenoise.c (chk_strdup_utf8): Declared. (edit_history_next, linenoise, lino_hist_add): Use chk_strdup_utf8 instead of strdup. --- lib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 7cb6d89b..6b8a9d6e 100644 --- a/lib.h +++ b/lib.h @@ -531,6 +531,7 @@ mem_t *chk_realloc(mem_t *, size_t size); mem_t *chk_grow_vec(mem_t *old, size_t oldelems, size_t newelems, size_t elsize); wchar_t *chk_strdup(const wchar_t *str); +char *chk_strdup_utf8(const char *str); val cons(val car, val cdr); val make_lazy_cons(val func); val make_half_lazy_cons(val func, val car); -- cgit v1.2.3