Changeset 8468


Ignore:
Timestamp:
03/03/13 21:12:42 (8 years ago)
Author:
gf
Message:

ird-guess: Allocate irdeto guess tab structure dynamically.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-ird-guess.c

    r8467 r8468  
    1313};
    1414
    15 static struct s_irdeto_quess *itab[0xff];
     15static struct s_irdeto_quess **itab;
    1616
    1717int32_t init_irdeto_guess_tab(void)
     
    2828  uint16_t caid, sid;
    2929  struct s_irdeto_quess *ird_row, *head;
     30
     31  if (!cs_malloc(&itab, sizeof(struct s_irdeto_quess *) * 0xff)) {
     32    fclose(fp);
     33    return 0;
     34  }
    3035
    3136  while (fgets(token, sizeof(token), fp))
     
    9196{
    9297  uint8_t i;
     98  if (!itab)
     99    return;
    93100  for (i = 0; i < 0xff; i++)
    94101  {
     
    101108    }
    102109  }
     110  free(itab);
    103111}
    104112
     
    110118  struct s_irdeto_quess *ptr;
    111119
     120  if (!itab)
     121    return;
    112122  b3  = er->ecm[3];
    113123  ptr = itab[b3];
Note: See TracChangeset for help on using the changeset viewer.