Skip to content
Snippets Groups Projects
Commit 3f9cc280 authored by Anatolii Kurotych's avatar Anatolii Kurotych
Browse files

[*] Fix calculation out size bug in enc_http_reply_encode

parent c8584a3d
No related branches found
No related tags found
No related merge requests found
...@@ -188,7 +188,10 @@ void enc_http_reply_encode(struct dap_http_simple *a_http_simple,enc_http_delega ...@@ -188,7 +188,10 @@ void enc_http_reply_encode(struct dap_http_simple *a_http_simple,enc_http_delega
if(a_http_simple->reply) if(a_http_simple->reply)
free(a_http_simple->reply); free(a_http_simple->reply);
size_t l_reply_size_max = a_http_delegate->response_size*2; // TODO make proper size calculations size_t l_reply_size_max = dap_enc_code_out_size(a_http_delegate->key,
a_http_delegate->response_size,
DAP_ENC_DATA_TYPE_RAW);
a_http_simple->reply = DAP_NEW_SIZE(void,l_reply_size_max); a_http_simple->reply = DAP_NEW_SIZE(void,l_reply_size_max);
a_http_simple->reply_size = dap_enc_code( a_http_delegate->key, a_http_simple->reply_size = dap_enc_code( a_http_delegate->key,
a_http_delegate->response, a_http_delegate->response_size, a_http_delegate->response, a_http_delegate->response_size,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment