Reject out-of-range RPC values instead of narrowing them silently.

Guards choke group max, set-port and info-hash length; parsing now uses std::from_chars.
This commit is contained in:
xirvik
2026-09-19 01:03:55 +00:00
parent 05cdd03cd2
commit f79cb257d7
15 changed files with 424 additions and 17 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ DownloadList::find(const torrent::HashString& hash) {
DownloadList::iterator
DownloadList::find_hex(const char* hash) {
if (strlen(hash) < 40)
if (strlen(hash) != 40)
return end();
torrent::HashString key;