2626#include " libintl.h"
2727#include < boost/python/object_fwd.hpp>
2828#include < cmath>
29+ #include < rtapi_string.h> // rtapi_strlcpy()
2930#include " interp_parameter_def.hh"
3031#include " interp_fwd.hh"
3132#include " interp_base.hh"
@@ -859,7 +860,7 @@ macros totally crash-proof. If the function call stack is deeper than
859860 do { \
860861 setError (fmt, ## __VA_ARGS__); \
861862 _setup.stack_index = 0 ; \
862- (strncpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
863+ (rtapi_strlcpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
863864 _setup.stack [_setup.stack_index ][STACK_ENTRY_LEN-1 ] = 0 ; \
864865 _setup.stack_index ++; \
865866 _setup.stack [_setup.stack_index ][0 ] = 0 ; \
@@ -870,7 +871,7 @@ macros totally crash-proof. If the function call stack is deeper than
870871 do { \
871872 setError (fmt, ## __VA_ARGS__); \
872873 _setup.stack_index = 0 ; \
873- (strncpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
874+ (rtapi_strlcpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
874875 _setup.stack [_setup.stack_index ][STACK_ENTRY_LEN-1 ] = 0 ; \
875876 _setup.stack_index ++; \
876877 _setup.stack [_setup.stack_index ][0 ] = 0 ; \
@@ -881,7 +882,7 @@ macros totally crash-proof. If the function call stack is deeper than
881882#define ERN (error_code ) \
882883 do { \
883884 _setup.stack_index = 0 ; \
884- (strncpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
885+ (rtapi_strlcpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
885886 _setup.stack [_setup.stack_index ][STACK_ENTRY_LEN-1 ] = 0 ; \
886887 _setup.stack_index ++; \
887888 _setup.stack [_setup.stack_index ][0 ] = 0 ; \
@@ -893,7 +894,7 @@ macros totally crash-proof. If the function call stack is deeper than
893894#define ERP (error_code ) \
894895 do { \
895896 if (_setup.stack_index < STACK_LEN - 1 ) { \
896- (strncpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
897+ (rtapi_strlcpy (_setup.stack [_setup.stack_index ], __PRETTY_FUNCTION__, STACK_ENTRY_LEN)); \
897898 _setup.stack [_setup.stack_index ][STACK_ENTRY_LEN-1 ] = 0 ; \
898899 _setup.stack_index ++; \
899900 _setup.stack [_setup.stack_index ][0 ] = 0 ; \
0 commit comments