PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » File_Bittorrent » Bug #3532

Bencode - encode and decode - wrong file size (length over 2GiB)

Details

Submitted2005-02-20 14:56 UTC
Frompepsiblue555 at hotmail dot com
Assignedtacker
StatusClosed
PackageFile_Bittorrent
PHP Version4.3.10
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-02-20 14:56 UTC] pepsiblue555 at hotmail dot com

Description:
------------
Since the package Bencode use intval and %d sprintf,
this will generate a wrong data for length info.
of a file that has size larger than 2GB.
(Integer limitation platform dependence)
So, using doubleval and %.0f sprintf might work,but
may be you have a better idea.