From: Mathis Rosenhauer Date: Thu, 14 Jan 2016 13:30:42 +0000 (+0100) Subject: Fail if output buffer cannot be completely filled with selected type. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025501~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a6b42c10ef34a42ba354399b2193e1c248ef11c;p=platform%2Fupstream%2Flibaec.git Fail if output buffer cannot be completely filled with selected type. --- diff --git a/src/decode.c b/src/decode.c index 3a8b7fe..66be682 100644 --- a/src/decode.c +++ b/src/decode.c @@ -804,6 +804,9 @@ int aec_decode(struct aec_stream *strm, int flush) struct internal_state *state = strm->state; int status; + if (strm->avail_out % strm->state->bytes_per_sample) + return AEC_MEM_ERROR; + strm->total_in += strm->avail_in; strm->total_out += strm->avail_out;