Changeset 2662 for trunk/reader-cryptoworks.c
- Timestamp:
- 07/06/10 17:18:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reader-cryptoworks.c
r2431 r2662 80 80 BN_free(r); 81 81 return(rc); 82 }83 84 int CheckSctLen(const uchar *data, int off)85 {86 int l=SCT_LEN(data);87 if (l+off > MAX_LEN)88 {89 cs_debug("[cryptoworks-reader] smartcard: section too long %d > %d", l, MAX_LEN-off);90 l=-1;91 }92 return(l);93 82 } 94 83 … … 283 272 284 273 unsigned char nanoD4[10]; 285 int l= CheckSctLen(data,-5+(ucpkValid ? sizeof(nanoD4):0));274 int l=check_sct_len(data,-5+(ucpkValid ? sizeof(nanoD4):0)); 286 275 if(l>5) { 287 276 unsigned char buff[MAX_LEN]; … … 357 346 static unsigned char insC0[] = { 0xA4,0xC0,0x00,0x00,0x1C }; 358 347 unsigned char nanoD4[10]; 359 int secLen= CheckSctLen(er->ecm,-5+(reader->ucpk_valid ? sizeof(nanoD4):0));348 int secLen=check_sct_len(er->ecm,-5+(reader->ucpk_valid ? sizeof(nanoD4):0)); 360 349 361 350 if(secLen>5)
Note:
See TracChangeset
for help on using the changeset viewer.