Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
httpc: use memmove for overlapping areas
  • Loading branch information
perexg committed Nov 18, 2015
1 parent 9f77089 commit a77fcb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/httpc.c
Expand Up @@ -1105,7 +1105,7 @@ http_client_run( http_client_t *hc )
return http_client_flush(hc, res);
res = HTTP_CON_RECEIVING;
if (hc->hc_rpos < r + 4 || hc->hc_rbuf[r] != '$') {
memcpy(hc->hc_rbuf, hc->hc_rbuf + r, hc->hc_rpos - r);
memmove(hc->hc_rbuf, hc->hc_rbuf + r, hc->hc_rpos - r);
hc->hc_rpos -= r;
goto next_header;
}
Expand Down

0 comments on commit a77fcb5

Please sign in to comment.