diff options
author | John Klug <john.klug@multitech.com> | 2020-10-13 17:08:58 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-10-14 14:16:38 -0500 |
commit | 9b727313435b84868f5f16c5e8a3aaf955ba13c8 (patch) | |
tree | bde3c773035ecab5e66648d048fb0816b2b5e08f | |
parent | f7258a220f4aecae4b40ce2efb84ba28a2c7308f (diff) | |
download | mts-io-9b727313435b84868f5f16c5e8a3aaf955ba13c8.tar.gz mts-io-9b727313435b84868f5f16c5e8a3aaf955ba13c8.tar.bz2 mts-io-9b727313435b84868f5f16c5e8a3aaf955ba13c8.zip |
No radio fix for array over-run4.4.1
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | io-module/mts-io.c | 8 | ||||
-rw-r--r-- | io-module/mts_io_module.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index c015e9c..511de1c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([mts-io], [4.4.0]) +AC_INIT([mts-io], [4.4.1]) AC_CONFIG_SRCDIR([util/mts_util_lora2_reset.c]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) diff --git a/io-module/mts-io.c b/io-module/mts-io.c index 204fd9f..0f4854b 100644 --- a/io-module/mts-io.c +++ b/io-module/mts-io.c @@ -823,7 +823,8 @@ mts_id_eeprom_load(void) if (is_radio_power_attr_mtcdt(ap[j])) { log_info("Pruning radio feature from mts-io",j); ap[j] = NULL; - current_blength = attr_blength = j * sizeof (ap[j]); + current_blength = j * sizeof (ap[j]); /* Size without NULL */ + attr_blength += sizeof (ap[j]); /* Size of attr array with NULL */ break; } } @@ -835,7 +836,7 @@ mts_id_eeprom_load(void) if(DEVICE_CAPA(id_eeprom.capa, CAPA_GPS)) { attr_blength += sizeof mtcdt_0_1_gnss_attributes; } - if (current_blength+(sizeof(struct attribute *)) != attr_blength) { + if (current_blength+(sizeof(struct attribute *)) != attr_blength) { freelater = all_attrs = kmalloc(attr_blength,GFP_KERNEL); current_count = current_blength/(sizeof (struct attribute *)); memcpy(all_attrs,mtcdt_0_1_platform_attributes,current_blength); @@ -874,7 +875,8 @@ mts_id_eeprom_load(void) if (is_radio_power_attr_mtcdt(ap[j])) { log_info("Pruning radio feature from mts-io",j); ap[j] = NULL; - current_blength = attr_blength = j * sizeof (ap[j]); + current_blength = j * sizeof (ap[j]); /* Size without NULL */ + attr_blength += sizeof (ap[j]); /* Size of attr array with NULL */ break; } } diff --git a/io-module/mts_io_module.h b/io-module/mts_io_module.h index cdaeaeb..14a5592 100644 --- a/io-module/mts_io_module.h +++ b/io-module/mts_io_module.h @@ -5,7 +5,7 @@ * MTAC cards. */ -#define DRIVER_VERSION "v4.4.0" +#define DRIVER_VERSION "v4.4.1" #define DRIVER_AUTHOR "Multitech Systems" #define DRIVER_DESC "MTS-IO Controller" #define DRIVER_NAME "mts-io" |