const unsigned char *bufptr = br->user_buffer;
VP8_BD_VALUE value = br->value;
int count = br->count;
- int shift = VP8_BD_VALUE_SIZE - 8 - (count + 8);
+ int shift = VP8_BD_VALUE_SIZE - CHAR_BIT - (count + CHAR_BIT);
size_t bytes_left = br->user_buffer_end - bufptr;
size_t bits_left = bytes_left * CHAR_BIT;
int x = (int) (shift + CHAR_BIT - bits_left);
if (br->decrypt_cb) {
size_t n =
- bytes_left > sizeof (decrypted) ? sizeof (decrypted) : bytes_left;
+ MIN (sizeof (decrypted), bytes_left);
br->decrypt_cb (br->decrypt_state, bufptr, decrypted, (int) n);
bufptr = decrypted;
}