Commit a58b8e99 authored by wm4's avatar wm4 Committed by Michael Niedermayer
Browse files

avformat/mpc8: fix broken pointer math


This could overflow and crash at least on 32 bit systems.
Reviewed-by: default avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b737a2c5)

Conflicts:

	libavformat/mpc8.c
(cherry picked from commit 49dd89f9

)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 42b4ba4a
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -88,7 +88,7 @@ static int mpc8_probe(AVProbeData *p)
size = bs_get_v(&bs);
if (size < 2)
return 0;
if (bs + size - 2 >= bs_end)
if (size >= bs_end - bs + 2)
return AVPROBE_SCORE_MAX / 4 - 1; //seems to be valid MPC but no header yet
if (header_found) {
if (size < 11 || size > 28)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment