From: anisota Date: Tue, 15 Jan 2008 18:10:35 +0000 (+0100) Subject: add left out part of map3b fix X-Git-Tag: 0.8.7~2 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=0b7b48761611bcdecf001b86e90ebf6a490d4dce;p=sasc-ng.git add left out part of map3b fix --- diff --git a/systems/nagra/nagra2-0101.c b/systems/nagra/nagra2-0101.c index c0ef8e7..e0c085b 100644 --- a/systems/nagra/nagra2-0101.c +++ b/systems/nagra/nagra2-0101.c @@ -439,7 +439,7 @@ void cMap0101::DoMap(int f, unsigned char *data, int l) if(!l) l=wordsize; MonInit(wordsize*60+4*l); I.GetLE(data,l<<3); - MonMul(B,I,B); + MonMul(B,I,B,l); break; case 0x3e: { diff --git a/systems/nagra/nagra2.c b/systems/nagra/nagra2.c index 61180c4..84c2212 100644 --- a/systems/nagra/nagra2.c +++ b/systems/nagra/nagra2.c @@ -266,9 +266,9 @@ void cMapCore::MakeJ0(BIGNUM *j, BIGNUM *d) BN_mod_inverse(j,j,x,ctx); } -void cMapCore::MonMul(BIGNUM *o, BIGNUM *a, BIGNUM *b, BIGNUM *c, BIGNUM *d, BIGNUM *j) +void cMapCore::MonMul(BIGNUM *o, BIGNUM *a, BIGNUM *b, BIGNUM *c, BIGNUM *d, BIGNUM *j, int words) { - int words=(BN_num_bytes(a)+7)>>3; + if(!words) words=wordsize; BN_zero(s); for(int i=0; i