From 62a97de058f92a9186efe117c204ddbb33a1b62e Mon Sep 17 00:00:00 2001 From: Gabor X Toth <*@tg-x.net> Date: Wed, 12 Oct 2016 19:11:01 +0000 Subject: [PATCH] my: fix extract_string --- src/my/my_result_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/my/my_result_helper.c b/src/my/my_result_helper.c index 6c6a4e3b1..f84550ced 100644 --- a/src/my/my_result_helper.c +++ b/src/my/my_result_helper.c @@ -554,7 +554,7 @@ post_extract_string (void * cls, return GNUNET_SYSERR; if (*results->is_null) { - rs->dst = NULL; + *(void **) rs->dst = NULL; return GNUNET_OK; } @@ -572,7 +572,8 @@ post_extract_string (void * cls, GNUNET_free (buf); return GNUNET_SYSERR; } - rs->dst = buf; + buf[size] = '\0'; + *(void **) rs->dst = buf; return GNUNET_OK; } -- 2.25.1