UINT8 my_filter;\r
\r
cmd_ptr = GetFreeCB (AdapterInfo);\r
- data_ptr = (UINT8 *) (&cmd_ptr->PhysTBDArrayAddres);\r
+ ASSERT (cmd_ptr != NULL);\r
+ data_ptr = (UINT8 *) cmd_ptr + sizeof (struct CB_Header);\r
\r
//\r
// start the config data right after the command header\r
eaddrs = (UINT16 *) AdapterInfo->CurrentNodeAddress;\r
\r
cmd_ptr = GetFreeCB (AdapterInfo);\r
- data_ptr = (UINT16 *) (&cmd_ptr->PhysTBDArrayAddres);\r
+ ASSERT (cmd_ptr != NULL);\r
+ data_ptr = (UINT16 *) ((UINT8 *) cmd_ptr +sizeof (struct CB_Header));\r
\r
//\r
// AVOID a bug (?!) here by marking the command already completed.\r
\r
tx_ptr_1 = (PXE_CPB_TRANSMIT *) (UINTN) cpb;\r
tx_ptr_f = (PXE_CPB_TRANSMIT_FRAGMENTS *) (UINTN) cpb;\r
+ Tmp_ptr = 0;\r
\r
//\r
// stop reentrancy here\r
// in words\r
//\r
AdapterInfo->NVData_Len = eeprom_len = (UINT16) (1 << addr_len);\r
- for (Index2 = 0, Index = 0; Index < eeprom_len; Index++) {\r
+ for (Index2 = 0, Index = 0; ((Index2 < PXE_MAC_LENGTH - 1) && (Index < eeprom_len)); Index++) {\r
UINT16 value;\r
value = E100bReadEeprom (AdapterInfo, Index, addr_len);\r
eedata[Index] = value;\r
AdapterInfo->statistics->tx_lost_carrier;\r
\r
if (DBsize > sizeof db) {\r
- DBsize = sizeof db;\r
+ DBsize = (UINT16) sizeof (db);\r
}\r
\r
CopyMem ((VOID *) (UINTN) DBaddr, (VOID *) &db, (UINTN) DBsize);\r