summaryrefslogtreecommitdiff
path: root/libavformat/omadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-24 00:29:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-24 00:29:02 +0200
commitfb45de779c8db142b44bf7b00c535ea2eee4f148 (patch)
treeed1921ecd7773972b8a730cb5db1995e8430d9fe /libavformat/omadec.c
parent23ad4d6f58e97b20d292e624f5fe01f39581d723 (diff)
downloadffmpeg-fb45de779c8db142b44bf7b00c535ea2eee4f148.tar.gz
avformat/omadec: simplify checks in nprobe()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/omadec.c')
-rw-r--r--libavformat/omadec.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index d0cb6d49a7..fe1f56ec15 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -171,11 +171,7 @@ static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size,
taglen = AV_RB32(&enc_header[pos + 32]);
datalen = AV_RB32(&enc_header[pos + 36]) >> 4;
- pos += 44;
- if (size - pos < taglen)
- return -1;
-
- pos += taglen;
+ pos += 44L + taglen;
if (pos + (((uint64_t)datalen) << 4) > size)
return -1;