From 62c6d2b165911e5bc96da38395e0fe2fb219fcc1 Mon Sep 17 00:00:00 2001 From: snowdrop Date: Tue, 6 Jan 2004 08:05:43 +0000 Subject: added null termination in callback function --- nanohttp/nanohttp-client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nanohttp/nanohttp-client.c b/nanohttp/nanohttp-client.c index 07c1d2d..de843ab 100644 --- a/nanohttp/nanohttp-client.c +++ b/nanohttp/nanohttp-client.c @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: nanohttp-client.c,v 1.8 2004/01/05 10:42:15 snowdrop Exp $ + * $Id: nanohttp-client.c,v 1.9 2004/01/06 08:05:43 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -691,7 +691,7 @@ void httpc_custom_res_callback(int counter, httpc_conn_t* conn, res->body = (unsigned char*)realloc(res->body, res->bodysize + 1); memcpy(&(res->body[res->bodysize-size]), buffer, size); - + res->body[res->bodysize]='\0'; } -- cgit v1.1-32-gdbae