Replace all instances of strcpy() with strncpy() to prevent buffer
overflow vulnerabilities. The strcpy() function does not perform
bounds checking, which can lead to security issues when copying
strings of unknown or excessive length.
Problem reported and fix suggested by Jaeyeong Lee.
Change-Id: Ide896dbae3bdaf9001287b4d3e387efd355e73bd
Mailbox (via FOEp) was written to after dropped back to pool and
MbxOut was NULL when calling ecx_mbxsend.
* obtain a new mailbox from the pool before filling it again.
* fix invalid pointer cast in ecx_mbxsend.
Remove TU/e as copyright holder. There is no longer any code
associated with that copyright holder remaining in the repository. All
contributions now reflect the current state of ownership and
development.
Change-Id: I00515c0d240cb7c17cc1919f9f9d618a902271e4
Merge simple_test, red_test and coetest samples into ec_sample for
easier maintenance. The ec_sample program demonstrates distributed
clock synchronization and slave mailbox cyclic handling in addition to
running a simple process data loop.
Change-Id: If0e9cd484e701902fddffc7165e0c83b70a06979
Ensure that ecx_EOEsend is called with a valid slave to prevent memory
corruption. This check addresses potential issues when mistakenly
invoked on devices like the EK1100 EtherCAT coupler.
Change-Id: I82ceff6c3f22c69a1531e27a30586bd6f20afe44
The string buffer in SDO2string could overflow for large octet
strings. Fix by limiting output to the size of the output string.
Change-Id: Ic45056918570d8320a02f70a8795b6b863a590ff
Simplify the API by adding overlap and byte alignment modes to the
context. SOEM can then call the correct functions internally. As a
consequence the following functions are removed from the public API:
ecx_config_overlap_map_group
ecx_config_map_group_aligned
ecx_send_overlap_processdata_group
ecx_send_overlap_processdata
Change-Id: I0404c4fbaa6be68be4c584af0cc9d62e780c7aaa
The ec_slave Ibyte count now includes one byte mailbox state per
slave. Use ec_group Ibytes instead. ec_group does not have Ibits
however.
Change-Id: Ic25563fda1d6ba2753ebf47fc45b70cc336c8671
Add blame ignore file. This file contains a list of commits to be
ignored for blaming purposes. Set this file as the default ignore file
by running:
$ git config blame.ignoreRevsFile .git-blame-ignore-revs
Change-Id: I30fe644875069b3dbf04da603d110c9873a572d4
This commit adds osal_get_monotonic_time() and
osal_monotonic_sleep(). These functions are designed to facilitate
synchronization with DC time, which can achieve nanosecond precision.
To support this functionality, the ec_timet structure has been
refactored to hold time values in nanoseconds, eliminating the need to
maintain separate time representations.
Change-Id: I039a006ccdb21ba35c437ab76e44e5153c711998
In commit [091a465], socket send/recv timeouts were temporarily
disabled. Restore non-blocking behaviour on recv by calling recv with
MSG_DONTWAIT.
Closes#451.
Change-Id: Ia5966ad55deec4d9364838f4ea4880fce37273fa