Change-Id: I64b27127b9d290b3791a020381f8f598ca3ca2ff
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
Name: capi-network-http
Summary: Http Framework
-Version: 0.0.21
+Version: 0.0.22
Release: 0
Group: System/Network
License: Apache-2.0
__http_transaction_h *transaction = (__http_transaction_h *)user_data;
__http_request_h *request = transaction->request;
size_t body_size = 0;
+ size_t max_size = size * nmemb;
char *data = NULL;
data = (char *)g_queue_pop_head(request->body_queue);
if (data) {
body_size = strlen(data);
- memcpy(ptr, data, body_size);
+ memcpy(ptr, data, (max_size > body_size) ? body_size : max_size);
} else {
DBG("Sent the last chunk.\n");
return 0;