Skip to content
Snippets Groups Projects
Commit 153fad14 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

init_get_bits8: zero pointers & struct on error

parent ac73d3a1
No related branches found
No related tags found
No related merge requests found
...@@ -407,7 +407,7 @@ static inline int init_get_bits8(GetBitContext *s, const uint8_t *buffer, ...@@ -407,7 +407,7 @@ static inline int init_get_bits8(GetBitContext *s, const uint8_t *buffer,
int byte_size) int byte_size)
{ {
if (byte_size > INT_MAX / 8 || byte_size < 0) if (byte_size > INT_MAX / 8 || byte_size < 0)
return AVERROR_INVALIDDATA; byte_size = -1;
return init_get_bits(s, buffer, byte_size * 8); return init_get_bits(s, buffer, byte_size * 8);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment