Skip to content
Snippets Groups Projects
Commit 11dcecfc authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Luca Barbato
Browse files

vorbisdec: Error on bark_map_size equal to 0.


The value is used to calculate output LSP curve and a division by zero
and out of array accesses would occur.

CVE-2013-0894

CC: libav-stable@libav.org

Reported-by: default avatarDale Curtis <dalecurtis@chromium.org>
Found-by: default avatar <inferno@chromium.org>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: default avatarLuca Barbato <lu_zero@gentoo.org>
parent 3d035d5a
No related branches found
No related tags found
No related merge requests found
...@@ -586,6 +586,11 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) ...@@ -586,6 +586,11 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
floor_setup->data.t0.order = get_bits(gb, 8); floor_setup->data.t0.order = get_bits(gb, 8);
floor_setup->data.t0.rate = get_bits(gb, 16); floor_setup->data.t0.rate = get_bits(gb, 16);
floor_setup->data.t0.bark_map_size = get_bits(gb, 16); floor_setup->data.t0.bark_map_size = get_bits(gb, 16);
if (floor_setup->data.t0.bark_map_size == 0) {
av_log(vc->avccontext, AV_LOG_ERROR,
"Floor 0 bark map size is 0.\n");
return AVERROR_INVALIDDATA;
}
floor_setup->data.t0.amplitude_bits = get_bits(gb, 6); floor_setup->data.t0.amplitude_bits = get_bits(gb, 6);
/* zero would result in a div by zero later * /* zero would result in a div by zero later *
* 2^0 - 1 == 0 */ * 2^0 - 1 == 0 */
......
  • Auri @aurieh

    mentioned in commit d86a5ce0

    ·

    mentioned in commit d86a5ce0

    Toggle commit list
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