FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
Describe the bug
In file included from ../../../../src/include/test/switch_test.h:36,
from test/test_amr.c:36:
In function ‘fctstr_safe_cpy’,
inlined from ‘fctstr_clone’ at ../../../../src/include/test/switch_fct.h:309:5:
../../../../src/include/test/switch_fct.h:258:5: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-trunca tion]
258 | strncpy(dst, src, num - 1);
| ^~~~~~
../../../../src/include/test/switch_fct.h: In function ‘fctstr_clone’:
../../../../src/include/test/switch_fct.h:306:12: note: length computed here
306 | klen = strlen(s)+1;
| ^~~~~
cc1: all warnings being treated as errors
To Reproduce
Steps to reproduce the behavior:
compile freeswitch with mod_amr
Describe the bug In file included from ../../../../src/include/test/switch_test.h:36, from test/test_amr.c:36: In function ‘fctstr_safe_cpy’, inlined from ‘fctstr_clone’ at ../../../../src/include/test/switch_fct.h:309:5: ../../../../src/include/test/switch_fct.h:258:5: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-trunca tion] 258 | strncpy(dst, src, num - 1); | ^
~~~~~../../../../src/include/test/switch_fct.h: In function ‘fctstr_clone’: ../../../../src/include/test/switch_fct.h:306:12: note: length computed here 306 | klen = strlen(s)+1; | ^~~~~ cc1: all warnings being treated as errorsTo Reproduce Steps to reproduce the behavior: compile freeswitch with mod_amr
Package version or git hash