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
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
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
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