From a6ac8f1c3828b73cdcf15651bbb01248e05f9ce3 Mon Sep 17 00:00:00 2001 From: leslie Date: Sun, 27 Sep 2009 21:37:55 +0800 Subject: [PATCH] cardclient-cccam2: fix handling partial DCW --- systems/cardclient/cccam2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/systems/cardclient/cccam2.c b/systems/cardclient/cccam2.c index 2997c67..5c423f9 100644 --- a/systems/cardclient/cccam2.c +++ b/systems/cardclient/cccam2.c @@ -872,7 +872,9 @@ bool cCardClientCCcam2::ProcessECM(const cEcmInfo *ecm, const unsigned char *dat shares.SetLag(shareid,l); PRINTF(L_CC_CCCAM2EX,"wait returned after %lld",l); if(newcw) { - memcpy(Cw,cw,16); + // check for partial CW + if(!CheckNull(cw+0,8)) memcpy(Cw+0,cw+0,8); + if(!CheckNull(cw+8,8)) memcpy(Cw+8,cw+8,8); cwmutex.Unlock(); ecmshares.AddStatus(ecm,shareid,1); PRINTF(L_CC_CCCAM2,"got CW"); -- 2.39.5