Changeset bd2a3700 in ffmpeg

Timestamp:
Apr 25, 2011, 8:45:19 PM (14 years ago)
Author:
Stefano Sabatini <stefano.sabatini-lala@poste.it>
Branches:
master
Children:
1da254b8
Parents:
1d6c82d4
git-author:
Stefano Sabatini <stefano.sabatini-lala@poste.it> (04/24/11 23:17:08)
git-committer:
Stefano Sabatini <stefano.sabatini-lala@poste.it> (04/25/11 20:45:19)
Message:

lsws: prevent overflow in sws_init_context()

In the loop:

for (i=0; i<dstH; i++) {

int chrI= i*c->chrDstH / dstH;

when i*c->chrDstH > INT_MAX this leads to an integer overflow, which
results in a negative value for chrI and in out-of-buffer reads. The
overflow is avoided by forcing int64_t arithmetic by casting i to
int64_t.

Fix crash, and trac issue #72.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>

(No files)

Note: See TracChangeset for help on using the changeset viewer.