During a meta download a peer specifies the length of the metadata via the key metadata_size. A peer can send a very large (or negative) number as the metadata_size. When the client attempts to check how many bytes it has left for this file an internal error is thrown. Attempting to remove the torrent will cause FileList::bytes_left to be called.
Extension Handshake Setting metadata_size to -1:
d1:md11:ut_metadatai3ee13:metadata_sizei-1ee
FileList::left_bytes
...
uint64_t left = size_bytes() - completed_bytes();
if (left > ((uint64_t)1 << 60))
throw internal_error("FileList::bytes_left() is too large.", data()->hash());
...
During a meta download a peer specifies the length of the metadata via the key metadata_size. A peer can send a very large (or negative) number as the metadata_size. When the client attempts to check how many bytes it has left for this file an internal error is thrown. Attempting to remove the torrent will cause FileList::bytes_left to be called.
Extension Handshake Setting metadata_size to -1: