1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 10:46:38 +02:00

Get rid of cast, do things properly.

This commit is contained in:
Bram Matthys
2022-06-09 16:41:07 +02:00
parent 0eb42155dd
commit 7679ec7920
+2 -1
View File
@@ -567,7 +567,8 @@ int _webserver_handle_body(Client *client, WebRequest *web, const char *readbuf,
WEB(client)->lefttoparselen = 0;
} else {
n = pktsize;
buf = (char *)readbuf; // FIXME: casting away a const AND writing later -- BAD!
free_this_buffer = buf = safe_alloc(n);
memcpy(buf, readbuf, n);
}
/* Chunked transfers.. yayyyy.. */