mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
fix: bitstream_index_map overflow
This commit is contained in:
parent
f1041c06a7
commit
0710a37429
4 changed files with 7 additions and 5 deletions
|
@ -222,11 +222,11 @@ static int get_from_fpga_combined_stream(lz4_streamp_t compressed_fpga_stream, u
|
|||
}
|
||||
|
||||
static int bitstream_target_to_index(FPGA_config bitstream_target) {
|
||||
static int8_t bitstream_index_map[FPGA_BITSTREAM_MAX] = {-1};
|
||||
static int8_t bitstream_index_map[FPGA_CONFIG_COUNT] = {-1};
|
||||
|
||||
// Initialize
|
||||
if (bitstream_index_map[0] == -1) {
|
||||
bitstream_index_map[0] = 0;
|
||||
if (bitstream_index_map[FPGA_BITSTREAM_UNKNOWN] == -1) {
|
||||
bitstream_index_map[FPGA_BITSTREAM_UNKNOWN] = 0;
|
||||
|
||||
for (size_t i = 0; i < g_fpga_bitstream_num; i++) {
|
||||
FPGA_VERSION_INFORMATION info = g_fpga_version_information[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue