diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-25 20:01:24 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-25 20:01:24 +0000 |
commit | 215b64156b9cdc542ba3826d1771c6b5343fe01a (patch) | |
tree | 558217d2e2282dedd1ce1f714c86ceb2f5ed741c | |
parent | 5572645334fb3a9a46fce6e8ddc626ee3cd21d27 (diff) | |
download | mpv-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
-rw-r--r-- | sub_cc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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(); |