Changeset 5369


Ignore:
Timestamp:
Jun 10, 2011, 12:40:40 AM (9 years ago)
Author:
Admin
Message:

Fix: When atr variable was specified, parts of the reader structure was overwritten by memset because of an incorrect size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-config.c

    r5365 r5369  
    38323832
    38333833    if ((!strcmp(token, "atr"))) {
    3834         memset(rdr->atr, 0, 128);
     3834        memset(rdr->atr, 0, sizeof(rdr->atr));
    38353835        rdr->atrlen = strlen(value);
    38363836        if(rdr->atrlen == 0) {
    38373837            return;
    38383838        } else {
     3839            if(rdr->atrlen > (int32_t)sizeof(rdr->atr) * 2)
     3840                rdr->atrlen = (int32_t)sizeof(rdr->atr) * 2;
    38393841            key_atob_l(value, rdr->atr, rdr->atrlen);
    38403842            return;
Note: See TracChangeset for help on using the changeset viewer.