summaryrefslogtreecommitdiffstats
path: root/sub_cc.c
diff options
context:
space:
mode:
authoruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-25 20:01:24 +0000
committeruau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-25 20:01:24 +0000
commit215b64156b9cdc542ba3826d1771c6b5343fe01a (patch)
tree558217d2e2282dedd1ce1f714c86ceb2f5ed741c /sub_cc.c
parent5572645334fb3a9a46fce6e8ddc626ee3cd21d27 (diff)
downloadmpv-215b64156b9cdc542ba3826d1771c6b5343fe01a.tar.bz2
mpv-215b64156b9cdc542ba3826d1771c6b5343fe01a.tar.xz
Add a sanity check to unsafe-looking code.
Does the memcpy to internal buffer here have any purpose besides enabling more potential buffer overflows? git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21250 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'sub_cc.c')
-rw-r--r--sub_cc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sub_cc.c b/sub_cc.c
index 2e3123f7bf..28c4bdb2c3 100644
--- a/sub_cc.c
+++ b/sub_cc.c
@@ -284,6 +284,8 @@ static void subcc_decode(void)
void subcc_process_data(unsigned char *inputdata,unsigned int len)
{
+ if (len > CC_INPUTBUFFER_SIZE)
+ return;
if(!subcc_enabled) return;
if(!inited) subcc_init();