Skip to content

toUInt32 on sizes bigger than 32 bit integers #11

@thermatk

Description

@thermatk

Trying to download a torrent with a file of a big size (4.7 GB) results in
TypeError: value is out of bounds
at TypeError ()
at checkInt (buffer.js:784:11)
at Buffer.writeUInt32BE (buffer.js:848:5)
at toUInt32 (/home/thermatk/dev/thermorrent/node_modules/peerflix/node_modules/torrent-stream/node_modules/bittorrent-tracker/index.js:489:7)
at announce (/home/thermatk/dev/thermorrent/node_modules/peerflix/node_modules/torrent-stream/node_modules/bittorrent-tracker/index.js:229:20)
at Socket.eval (/home/thermatk/dev/thermorrent/node_modules/peerflix/node_modules/torrent-stream/node_modules/bittorrent-tracker/index.js:179:9)
at Socket.EventEmitter.emit (events.js:98:17)
at UDP.onMessage (dgram.js:437:8)

There is something in the code around about 64-bit? Is it possible to fix by converting to 64 bit integers? Something should be done :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions