SOEM/soem
Michael Egli ff448e3485 Fix some UB cases. Closes #546
There are two cases of UB that are fixed in this commit.

1. In ethercatmain.c, there are two left shifts of 31:

    (1 << 31)

Because 1 is a signed int by default, the result cannot be represented
in an int. The fix is to explicitly make the 1 unsigned.

2. In ethercatconfig.c, for slaves that have no inputs, the code would
   apply an offset to a NULL pointer. The fix is to test that the slave
   has inputs available before applying the offset.

Both cases were found by clang with the help of UBSan.
2021-08-31 13:02:10 +02:00
..
ethercat.h Impelmented EoE filter function in mailbox receive (#244) 2019-01-31 14:57:16 +01:00
ethercatbase.c Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercatbase.h Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercatcoe.c Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercatcoe.h Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercatconfig.c Fix some UB cases. Closes #546 2021-08-31 13:02:10 +02:00
ethercatconfig.h Add functions to configure and send an overlapping IOmap 2018-02-01 13:01:35 +01:00
ethercatconfiglist.h Fix typos in comments. 2019-02-04 13:56:11 +01:00
ethercatdc.c Revert "EoE and Distributed clock fixes" 2020-08-18 14:56:16 +02:00
ethercatdc.h Move license information to LICENSE file (#95) 2017-03-29 07:16:44 +02:00
ethercateoe.c Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercateoe.h Adjust size of ec_EOE_t to max mailbox size 2021-06-02 20:18:25 +02:00
ethercatfoe.c Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercatfoe.h Move license information to LICENSE file (#95) 2017-03-29 07:16:44 +02:00
ethercatmain.c Fix some UB cases. Closes #546 2021-08-31 13:02:10 +02:00
ethercatmain.h add userdata to ec_context 2021-02-13 12:26:38 -08:00
ethercatprint.c Add ec_error to string print function, fixes #227 and fixes #232 2019-05-24 14:01:40 +02:00
ethercatprint.h Add ec_error to string print function, fixes #227 and fixes #232 2019-05-24 14:01:40 +02:00
ethercatsoe.c Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercatsoe.h Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00
ethercattype.h Fix llvm compiler implicit-int-conversion warnings 2020-10-12 16:24:42 +02:00