libvorbis-1.3.4 misdecodes streams with single-symbol codebooks
According to the Vorbis specification (https://xiph.org/vorbis/doc/Vorbis_I_spec.html), "a codebook with a single used entry ... consists of a single codework of zero bits and 'reading' a value out of such a codebook always returns the single used value and sinks zero bits". However, libvorbis-1.3.4 does not follow this requirement, instead sinking a nonzero number of bits (presumably the number specified in the codebook). See the attached sample file.
I will note that the reference encoder does not seem to generate single-symbol codebooks, and the specification is unclear on how they should be encoded (since the bitstream format does not allow one to specify a code length of zero bits). However, I've seen files in the wild which do in fact contain such a codebook, perhaps as a result of some sort of external codebook optimizer.
The attached "sample.ogg" file was created from "original.ogg" by modifying the codebook at index 20 (file offset 0x503 + 1 bit; 18 symbols, of which only symbol 9 of length 3 bits is used) so all unused symbols are excluded from the Huffman decision tree, then deleting the 3 bits which encoded that symbol at the two locations it was used, file offsets 0x3117 + 4 bits and 0x3402 + 6 bits.