Re:Show HN: I wrote a BitTorrent Client from scratch
by jorkingit on Friday June 13, 2025 @02:26AM
(#44266174)
Great work! Just an FYI, you might want to limit the dynamic allocation size in the bencode decoder: since it's untrusted input (either from torrent or announce), a malicious input could DoS the client by requesting extremely large allocations during string parsing. A good upper bound could be the remaining length of the input, as a well formed torrent can't contain a string longer than the rest of the file.
[ Parent
| on HN ]
Re:Show HN: I wrote a BitTorrent Client from scratch
by piyushgupta53 on Friday June 13, 2025 @02:38AM
(#44266221)
thanks for pointing this out. I've added this in my to-dos.