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
2018-01-23 17:07:59 +01:00
2021-04-10 16:49:17 +02:00
2021-08-31 13:02:10 +02:00
2017-08-16 20:07:39 +02:00
2021-02-17 13:53:41 +01:00
2021-04-10 16:49:17 +02:00
2017-08-16 20:07:39 +02:00
2021-02-17 13:53:41 +01:00

Simple Open EtherCAT Master Library

Build Status

BUILDING

Prerequisites for all platforms

  • CMake 2.8.0 or later

Windows (Visual Studio)

  • Start a Visual Studio command prompt then:
    • mkdir build
    • cd build
    • cmake .. -G "NMake Makefiles"
    • nmake

Linux & macOS

  • mkdir build
  • cd build
  • cmake ..
  • make

ERIKA Enterprise RTOS

Documentation

See https://openethercatsociety.github.io/doc/soem/

Want to contribute to SOEM or SOES?

If you want to contribute to SOEM or SOES you will need to sign a Contributor License Agreement and send it to us either by e-mail or by physical mail. More information is available in the PDF.

Description
No description provided
Readme 1.6 MiB
Languages
C 99.3%
CMake 0.7%