mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Replace a LOT of sprintf with snprintf, and a few strcpy with truncate_cpy
This commit is contained in:
@@ -191,7 +191,7 @@ static void DiscHandler(const http::Request &request, const Path &filename) {
|
||||
|
||||
s64 len = last - begin + 1;
|
||||
char contentRange[1024];
|
||||
sprintf(contentRange, "Content-Range: bytes %lld-%lld/%lld\r\n", begin, last, sz);
|
||||
snprintf(contentRange, sizeof(contentRange), "Content-Range: bytes %lld-%lld/%lld\r\n", begin, last, sz);
|
||||
request.WriteHttpResponseHeader("1.0", 206, len, "application/octet-stream", contentRange);
|
||||
|
||||
const size_t CHUNK_SIZE = 16 * 1024;
|
||||
|
||||
Reference in New Issue
Block a user