ov_raw_total() ignores the size of the last page
The maintainers of the Debian package "libogg-vorbis-decoder-perl" discovered that the return value of
i<0 changed after we (the Debian libvorbisfile maintainers) backported the upstream commit r19165. That change breaks one of their test cases. The same behavior can also be observed in the unpatched 1.3.5 release.
Indeed, their test case seems to be correct and the new libvorbisfile3 version returns an incorrect value. My analysis showed that the returned value is the difference between the offset of the last page and the offset of the first page of the only logical bitstream in the file. However, in order to comply with the specification, it should be the difference between the first byte after the last page and the offset of the first page. So the returned value is missing the size of the last page.