[vorbis-dev] Extra data in header packets

Martin C. Martin martin at metahuman.org
Sun Nov 4 17:34:22 PST 2001



Hi,

>From my understanding, if someone were to modify the Vorbis encoder to
include extra data at the end of any of the three header packets, then
the decode will silently ignore it.  That's because the only EOP check
is for the 1 bit added at the end of each packet.  If there were extra
data after that EOP bit, it would be silently ignored.  Right?

If I want to consider extra data like that to be an error, then after
the following line:

  if(oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */

I could add:

  /* Consume rest of byte */
  oggpack_read(opb, 7);
  /* Is there any more data? */
  if (oggpack_read(opb, 1) != -1) goto err_out;

I'd have to do that in three places, once each in _vorbis_unpack_info,
_vorbis_unpack_comment and _vorbis_unpack_books.

Is that right?  Would that work?

Thanks,
Martin

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list