This is not a bug in Winamp, you didn't research carefully enough. If you read the ID3v2 spec
closely, you'll notice:
The ID3v2 tag size is encoded with four bytes where the most significant bit (bit 7) is set to zero in every byte, making a total of 28 bits. The zeroed bits are ignored, so a 257 bytes long tag is represented as $00 00 02 01.
The most significant bit is zeroed to prevent the header from being mistaken as the MP3 sync. Since the most significant bit is ignored, you can't just convert it directly from hex to binary. If you did that, the example ($00 00 02 01) would come out to 513 bytes when it really should come out to 257 bytes.
If you want the code to find the size, here's some example code in PHP, but it should be easy to port: (this assumes $fp is the file descriptor of the mp3, and it's right at the position of the size portion of the id3v2 header)
$bytes = array();
for ($i = 0; $i < 4; $i++)
$bytes[$i] = fgetc($fp);
$v2size = (
($bytes << 21) |
($bytes << 14) |
($bytes << 7) |
(if the most significant bit wasn't ignored, the numbers would be 24, 16, 8)