Browse Source

http_async_client: null terminate the request id in the callback

Federico Cabiddu 8 years ago
parent
commit
b356c73494
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/modules/http_async_client/async_http.c

+ 2 - 0
src/modules/http_async_client/async_http.c

@@ -192,6 +192,8 @@ void async_http_cb(struct http_m_reply *reply, void *param)
 	aq = param;
 	aq = param;
 	strncpy(q_id, aq->id, strlen(aq->id));
 	strncpy(q_id, aq->id, strlen(aq->id));
 	
 	
+	q_id[strlen(aq->id)] = '\0';
+
 	act = (cfg_action_t*)aq->param;
 	act = (cfg_action_t*)aq->param;
 	cfg_update();
 	cfg_update();