Merge commit '1c736bedd9891501960ebac0f7c05eb60225e947'

* commit '1c736bedd9891501960ebac0f7c05eb60225e947':
  omadec: check GEOB sizes against buffer size

Conflicts:
	libavformat/omadec.c

See: e74fa25cb9
See: 91e72e3514
Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/45/head
Michael Niedermayer 11 years ago
commit aeaca3816c
  1. 5
      libavformat/omadec.c

@ -232,9 +232,8 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
av_log(s, AV_LOG_ERROR, "Invalid encryption header\n");
return AVERROR_INVALIDDATA;
}
if ( OMA_ENC_HEADER_SIZE + oc->k_size + oc->e_size + oc->i_size + 8 > geob->datasize
|| OMA_ENC_HEADER_SIZE + 48 > geob->datasize
) {
if (OMA_ENC_HEADER_SIZE + oc->k_size + oc->e_size + oc->i_size + 8 > geob->datasize ||
OMA_ENC_HEADER_SIZE + 48 > geob->datasize) {
av_log(s, AV_LOG_ERROR, "Too little GEOB data\n");
return AVERROR_INVALIDDATA;
}

Loading…
Cancel
Save