From: leslie Date: Wed, 2 Jan 2008 00:01:04 +0000 (+0100) Subject: seca: fix memcpy in ECM/EMM processing, broken by AUTOMEM change X-Git-Tag: 0.8.7~26 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=bda13dff8c7117dcb3c62bac32ac09060b02499b;p=sasc-ng.git seca: fix memcpy in ECM/EMM processing, broken by AUTOMEM change --- diff --git a/systems/seca/seca.c b/systems/seca/seca.c index 920bb9e..086a0f3 100644 --- a/systems/seca/seca.c +++ b/systems/seca/seca.c @@ -1227,7 +1227,7 @@ bool cSystemSeca::ProcessECM(const cEcmInfo *ecmD, unsigned char *data) cKeySnoop ks(this,'S',ecmD->provId,keyNr&0x0F); unsigned char *buff=AUTOMEM(msgLen); while((pk=keys.FindKey('S',ecmD->provId,keyNr&0x0F,key8?8:16,pk))) { - memcpy(buff,ecm,sizeof(buff)); // if decoding fails we need the original data + memcpy(buff,ecm,msgLen); // if decoding fails we need the original data unsigned char PK[16], signature[20]; pk->Get(PK); @@ -1565,7 +1565,7 @@ void cSystemSeca::ProcessEMM(int pid, int caid, unsigned char *buffer) } unsigned char signature[20]; - memcpy(buff,emm,sizeof(buff)); // if decoding fails we need the original de-sse'd data + memcpy(buff,emm,msgLen); // if decoding fails we need the original de-sse'd data if(!SE) { for(int i=0 ; i<=64 && i