Ver Fonte

http_async_client: null terminate the request id in the callback

Federico Cabiddu há 8 anos atrás
pai
commit
b356c73494
1 ficheiros alterados com 2 adições e 0 exclusões
  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;
 	strncpy(q_id, aq->id, strlen(aq->id));
 	
+	q_id[strlen(aq->id)] = '\0';
+
 	act = (cfg_action_t*)aq->param;
 	cfg_update();