Revision 24e6f355

b/hw/eepro100.c
694 694
                logout
695 695
                    ("illegal values of TBD array address and TCB byte count!\n");
696 696
            }
697
            uint8_t buf[MAX_ETH_FRAME_SIZE + 4];
697
            // sends larger than MAX_ETH_FRAME_SIZE are allowed, up to 2600 bytes
698
            uint8_t buf[2600];
698 699
            uint16_t size = 0;
699 700
            uint32_t tbd_address = cb_address + 0x10;
700 701
            assert(tcb_bytes <= sizeof(buf));
......
706 707
                logout
707 708
                    ("TBD (simplified mode): buffer address 0x%08x, size 0x%04x\n",
708 709
                     tx_buffer_address, tx_buffer_size);
710
                tx_buffer_size = MIN(tx_buffer_size, sizeof(buf) - size);
709 711
                cpu_physical_memory_read(tx_buffer_address, &buf[size],
710 712
                                         tx_buffer_size);
711 713
                size += tx_buffer_size;
......
726 728
                        logout
727 729
                            ("TBD (extended flexible mode): buffer address 0x%08x, size 0x%04x\n",
728 730
                             tx_buffer_address, tx_buffer_size);
731
                        tx_buffer_size = MIN(tx_buffer_size, sizeof(buf) - size);
729 732
                        cpu_physical_memory_read(tx_buffer_address, &buf[size],
730 733
                                                 tx_buffer_size);
731 734
                        size += tx_buffer_size;
......
743 746
                    logout
744 747
                        ("TBD (flexible mode): buffer address 0x%08x, size 0x%04x\n",
745 748
                         tx_buffer_address, tx_buffer_size);
749
                    tx_buffer_size = MIN(tx_buffer_size, sizeof(buf) - size);
746 750
                    cpu_physical_memory_read(tx_buffer_address, &buf[size],
747 751
                                             tx_buffer_size);
748 752
                    size += tx_buffer_size;

Also available in: Unified diff