]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
wma: Make bitstream API more robust.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 5 Jun 2017 14:52:37 +0000 (16:52 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 6 Jul 2017 19:00:36 +0000 (21:00 +0200)
The ->buffer_end field of struct getbit_context is set but never
used. In fact, we never check bounds and happily read beyond the
supplied data buffer.

Fix this by replacing the field by ->num_bits, an integer which
is initialized in init_get_bits() to the number of bits available.
All functions which read the bitstream are modified to check bounds.


No differences found