Commit 13ce66f2 authored by reimar's avatar reimar

Try to clarify that anyone using get_bits must check for buffer overrun

themselves, get_bits does not do anything in that regard.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19794 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 59a7d76f
...@@ -489,6 +489,9 @@ static inline int check_marker(GetBitContext *s, const char *msg) ...@@ -489,6 +489,9 @@ static inline int check_marker(GetBitContext *s, const char *msg)
* @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger then the actual read bits * @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger then the actual read bits
* because some optimized bitstream readers read 32 or 64 bit at once and could read over the end * because some optimized bitstream readers read 32 or 64 bit at once and could read over the end
* @param bit_size the size of the buffer in bits * @param bit_size the size of the buffer in bits
*
* While GetBitContext stores the buffer size, for performance reasons you are
* responsible for checking for the buffer end yourself (take advantage of the padding)!
*/ */
static inline void init_get_bits(GetBitContext *s, static inline void init_get_bits(GetBitContext *s,
const uint8_t *buffer, int bit_size) const uint8_t *buffer, int bit_size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment