# HG changeset patch # User uau # Date 1164484884 0 # Node ID f61fd8cc31282d1dab1d92460ef579bd067a9105 # Parent 0b17f818d393e36ba46bff9c629fc11655c48494 Add a sanity check to unsafe-looking code. Does the memcpy to internal buffer here have any purpose besides enabling more potential buffer overflows? diff -r 0b17f818d393 -r f61fd8cc3128 sub_cc.c --- a/sub_cc.c Sat Nov 25 19:57:31 2006 +0000 +++ b/sub_cc.c Sat Nov 25 20:01:24 2006 +0000 @@ -284,6 +284,8 @@ void subcc_process_data(unsigned char *inputdata,unsigned int len) { + if (len > CC_INPUTBUFFER_SIZE) + return; if(!subcc_enabled) return; if(!inited) subcc_init();