From 95c7d71fb2f3565621bf6670542809bf471ce805 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 1 Nov 2012 18:05:47 -0300 Subject: [PATCH] tools/libtxt/edit.c (add_string): NULL-terminate the list of edits --- tools/libtxt/edit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libtxt/edit.c b/tools/libtxt/edit.c index 4e023f9..9b93910 100644 --- a/tools/libtxt/edit.c +++ b/tools/libtxt/edit.c @@ -195,6 +195,7 @@ static void add_string(struct edit ***last, const char *start, size_t len) e = alloc_type(struct edit); e->type = edit_string; e->u.s = alloc_string_n(start, len); + e->next = NULL; **last = e; *last = &e->next; }