Просмотр исходного кода

http_async_client: null terminate the request id in the callback

Federico Cabiddu 8 лет назад
Родитель
Сommit
b356c73494
1 измененных файлов с 2 добавлено и 0 удалено
  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();