vorbis: Validate that the floor 1 X values contain no duplicates.
Duplicate values in this vector are explicitly banned by the Vorbis I spec and cause divide-by-zero crashes later on.
This commit is contained in:
@@ -340,7 +340,8 @@ static int create_vorbis_context(vorbis_enc_context *venc,
|
||||
};
|
||||
fc->list[i].x = a[i - 2];
|
||||
}
|
||||
ff_vorbis_ready_floor1_list(fc->list, fc->values);
|
||||
if (ff_vorbis_ready_floor1_list(avccontext, fc->list, fc->values))
|
||||
return AVERROR_BUG;
|
||||
|
||||
venc->nresidues = 1;
|
||||
venc->residues = av_malloc(sizeof(vorbis_enc_residue) * venc->nresidues);
|
||||
|
||||
Reference in New Issue
Block a user