Changeset 2934 for trunk/csctapi/atr.c


Ignore:
Timestamp:
08/18/10 20:08:02 (10 years ago)
Author:
rorothetroll
Message:

more test for ATR checking. Check that TB1 is valid (<0x80)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/csctapi/atr.c

    r2933 r2934  
    192192        }
    193193    }
     194   
     195    // check that TB1 < 0x80
     196    if ( (atr->pn==1) && (atr->ib[pn][ATR_INTERFACE_BYTE_TB].present == TRUE)) {
     197        if(atr->ib[pn][ATR_INTERFACE_BYTE_TB].value > 0x80) {
     198            cs_debug("Invalid ATR as TB1 has an invalid value");
     199            return (ATR_MALFORMED);
     200        }
     201    }
    194202    return (ATR_OK);
    195203}
Note: See TracChangeset for help on using the changeset viewer.