Mercurial > libavcodec.hg
changeset 4883:9055ed00a295 libavcodec
fix exploitable buffer overflow
| author | michael |
|---|---|
| date | Fri, 27 Apr 2007 12:41:55 +0000 |
| parents | 8131ccb4ea72 |
| children | b23051d2a676 |
| files | dca.c |
| diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dca.c Fri Apr 27 09:32:31 2007 +0000 +++ b/dca.c Fri Apr 27 12:41:55 2007 +0000 @@ -1089,6 +1089,9 @@ uint16_t *ssrc = (uint16_t *) src, *sdst = (uint16_t *) dst; PutBitContext pb; + if((unsigned)src_size > (unsigned)max_size) + return -1; + mrk = AV_RB32(src); switch (mrk) { case DCA_MARKER_RAW_BE:
